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; } }
public boolean isTypeManyToMany() { return RepositoryConst.MAPPING_MANY_TO_MANY.equals(cardinality); }