Example #1
0
 public void setCardinality(String p_type) {
   if (p_type != null) {
     if (RepositoryConst.MAPPING_ONE_TO_ONE.equalsIgnoreCase(p_type)) {
       this.cardinality = RepositoryConst.MAPPING_ONE_TO_ONE;
     } else if (RepositoryConst.MAPPING_ONE_TO_MANY.equalsIgnoreCase(p_type)) {
       this.cardinality = RepositoryConst.MAPPING_ONE_TO_MANY;
     } else if (RepositoryConst.MAPPING_MANY_TO_ONE.equalsIgnoreCase(p_type)) {
       this.cardinality = RepositoryConst.MAPPING_MANY_TO_ONE;
     } else if (RepositoryConst.MAPPING_MANY_TO_MANY.equalsIgnoreCase(p_type)) {
       this.cardinality = RepositoryConst.MAPPING_MANY_TO_MANY;
     } else {
       this.cardinality = RepositoryConst.MAPPING_UNKNOWN;
     }
   } else {
     this.cardinality = RepositoryConst.MAPPING_UNKNOWN;
   }
 }
Example #2
0
 public boolean isTypeManyToOne() {
   return RepositoryConst.MAPPING_MANY_TO_ONE.equals(cardinality);
 }