| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| OneToManyDescriptor |
|
| 1.6666666666666667;1.667 |
| 1 | /* | |
| 2 | * Copyright 2007-2008 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.opensource.org/licenses/ecl2.php | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | package org.kuali.rice.core.jpa.metadata; | |
| 17 | ||
| 18 | import javax.persistence.CascadeType; | |
| 19 | ||
| 20 | import org.apache.commons.lang.StringUtils; | |
| 21 | ||
| 22 | /** | |
| 23 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 24 | */ | |
| 25 | 0 | public class OneToManyDescriptor extends CollectionDescriptor implements java.io.Serializable { |
| 26 | ||
| 27 | private static final long serialVersionUID = -7145401132818575015L; | |
| 28 | ||
| 29 | @Override | |
| 30 | public boolean isInsertable() { | |
| 31 | 0 | return true; |
| 32 | } | |
| 33 | ||
| 34 | @Override | |
| 35 | public boolean isUpdateable() { | |
| 36 | 0 | return true; |
| 37 | } | |
| 38 | ||
| 39 | public String toString() { | |
| 40 | 0 | StringBuffer sb = new StringBuffer(); |
| 41 | 0 | sb.append("OneToManyDescriptor = [ "); |
| 42 | 0 | sb.append("targetEntity:").append(targetEntity.getName()).append(", "); |
| 43 | 0 | sb.append("cascade = { "); |
| 44 | 0 | for (CascadeType ct : cascade) { |
| 45 | 0 | sb.append(ct).append(" "); |
| 46 | } | |
| 47 | 0 | sb.append("}, "); |
| 48 | 0 | sb.append("fetch:").append(fetch); |
| 49 | 0 | if (!StringUtils.isBlank(mappedBy)) { |
| 50 | 0 | sb.append(", mappedBy:").append(mappedBy); |
| 51 | } | |
| 52 | 0 | sb.append(" ]"); |
| 53 | 0 | return sb.toString(); |
| 54 | } | |
| 55 | ||
| 56 | } |