| Method from org.hibernate.mapping.Collection Detail: |
public void addFilter(String name,
String condition) {
filters.put( name, condition );
}
|
public void addManyToManyFilter(String name,
String condition) {
manyToManyFilters.put( name, condition );
}
|
public void createAllKeys() throws MappingException {
createForeignKeys();
if ( !isInverse() ) createPrimaryKey();
}
|
public void createForeignKey() {
}
|
abstract void createPrimaryKey()
|
public int getBatchSize() {
return batchSize;
}
|
public String getCacheConcurrencyStrategy() {
return cacheConcurrencyStrategy;
}
|
public String getCacheRegionName() {
return cacheRegionName == null ? role : cacheRegionName;
}
|
public Class getCollectionPersisterClass() {
return collectionPersisterClass;
}
|
public Table getCollectionTable() {
return collectionTable;
}
|
public CollectionType getCollectionType() {
if ( typeName == null ) {
return getDefaultCollectionType();
}
else {
return TypeFactory.customCollection( typeName, typeParameters, role, referencedPropertyName, isEmbedded() );
}
}
|
public boolean[] getColumnInsertability() {
return ArrayHelper.EMPTY_BOOLEAN_ARRAY;
}
|
public Iterator getColumnIterator() {
return EmptyIterator.INSTANCE;
}
|
public int getColumnSpan() {
return 0;
}
|
public boolean[] getColumnUpdateability() {
return ArrayHelper.EMPTY_BOOLEAN_ARRAY;
}
|
public Comparator getComparator() {
if ( comparator == null && comparatorClassName != null ) {
try {
setComparator( (Comparator) ReflectHelper.classForName( comparatorClassName ).newInstance() );
}
catch ( Exception e ) {
throw new MappingException(
"Could not instantiate comparator class [" + comparatorClassName
+ "] for collection " + getRole()
);
}
}
return comparator;
}
|
public String getComparatorClassName() {
return comparatorClassName;
}
|
public String getCustomSQLDelete() {
return customSQLDelete;
}
|
public String getCustomSQLDeleteAll() {
return customSQLDeleteAll;
}
|
public ExecuteUpdateResultCheckStyle getCustomSQLDeleteAllCheckStyle() {
return deleteAllCheckStyle;
}
|
public ExecuteUpdateResultCheckStyle getCustomSQLDeleteCheckStyle() {
return deleteCheckStyle;
}
|
public String getCustomSQLInsert() {
return customSQLInsert;
}
|
public ExecuteUpdateResultCheckStyle getCustomSQLInsertCheckStyle() {
return insertCheckStyle;
}
|
public String getCustomSQLUpdate() {
return customSQLUpdate;
}
|
public ExecuteUpdateResultCheckStyle getCustomSQLUpdateCheckStyle() {
return updateCheckStyle;
}
|
abstract public CollectionType getDefaultCollectionType() throws MappingException
|
public Value getElement() {
return element;
}
|
public String getElementNodeName() {
return elementNodeName;
}
|
public FetchMode getFetchMode() {
return fetchMode;
}
|
public Map getFilterMap() {
return filters;
}
|
public KeyValue getKey() {
return key;
}
|
public String getLoaderName() {
return loaderName;
}
|
public Map getManyToManyFilterMap() {
return manyToManyFilters;
}
|
public String getManyToManyOrdering() {
return manyToManyOrderBy;
}
|
public String getManyToManyWhere() {
return manyToManyWhere;
}
|
public String getNodeName() {
return nodeName;
}
|
public String getOrderBy() {
return orderBy;
}
|
public PersistentClass getOwner() {
return owner;
}
|
public String getOwnerEntityName() {
return owner.getEntityName();
}
|
public String getReferencedPropertyName() {
return referencedPropertyName;
}
|
public String getRole() {
return role;
}
|
public Set getSynchronizedTables() {
return synchronizedTables;
}
|
public Table getTable() {
return owner.getTable();
}
|
public Type getType() throws MappingException {
return getCollectionType();
}
|
public String getTypeName() {
return typeName;
}
|
public Properties getTypeParameters() {
return typeParameters;
}
|
public String getWhere() {
return where;
}
|
public boolean hasFormula() {
return false;
}
|
public boolean hasOrder() {
return orderBy!=null || manyToManyOrderBy!=null;
}
|
public boolean hasOrphanDelete() {
return orphanDelete;
}
|
public boolean isAlternateUniqueKey() {
return false;
}
|
public boolean isArray() {
return false;
}
|
public boolean isCustomDeleteAllCallable() {
return customDeleteAllCallable;
}
|
public boolean isCustomDeleteCallable() {
return customDeleteCallable;
}
|
public boolean isCustomInsertCallable() {
return customInsertCallable;
}
|
public boolean isCustomUpdateCallable() {
return customUpdateCallable;
}
|
public boolean isEmbedded() {
return embedded;
}
|
public boolean isExtraLazy() {
return extraLazy;
}
|
public boolean isIdentified() {
return false;
}
|
public boolean isIndexed() {
return false;
}
|
public boolean isInverse() {
return inverse;
}
|
public boolean isLazy() {
return lazy;
}
|
public boolean isMap() {
return false;
}
|
public boolean isMutable() {
return mutable;
}
|
public boolean isNullable() {
return true;
}
|
public boolean isOneToMany() {
return element instanceof OneToMany;
}
|
public boolean isOptimisticLocked() {
return optimisticLocked;
}
|
public boolean isPrimitiveArray() {
return false;
}
|
public boolean isSet() {
return false;
}
|
public boolean isSimpleValue() {
return false;
}
|
public boolean isSorted() {
return sorted;
}
|
public boolean isSubselectLoadable() {
return subselectLoadable;
}
|
public boolean isValid(Mapping mapping) throws MappingException {
return true;
}
|
public void setBatchSize(int i) {
batchSize = i;
}
|
public void setCacheConcurrencyStrategy(String cacheConcurrencyStrategy) {
this.cacheConcurrencyStrategy = cacheConcurrencyStrategy;
}
|
public void setCacheRegionName(String cacheRegionName) {
this.cacheRegionName = cacheRegionName;
}
|
public void setCollectionPersisterClass(Class persister) {
this.collectionPersisterClass = persister;
}
|
public void setCollectionTable(Table table) {
this.collectionTable = table;
}
|
public void setComparator(Comparator comparator) {
this.comparator = comparator;
}
|
public void setComparatorClassName(String comparatorClassName) {
this.comparatorClassName = comparatorClassName;
}
|
public void setCustomSQLDelete(String customSQLDelete,
boolean callable,
ExecuteUpdateResultCheckStyle checkStyle) {
this.customSQLDelete = customSQLDelete;
this.customDeleteCallable = callable;
this.deleteCheckStyle = checkStyle;
}
|
public void setCustomSQLDeleteAll(String customSQLDeleteAll,
boolean callable,
ExecuteUpdateResultCheckStyle checkStyle) {
this.customSQLDeleteAll = customSQLDeleteAll;
this.customDeleteAllCallable = callable;
this.deleteAllCheckStyle = checkStyle;
}
|
public void setCustomSQLInsert(String customSQLInsert,
boolean callable,
ExecuteUpdateResultCheckStyle checkStyle) {
this.customSQLInsert = customSQLInsert;
this.customInsertCallable = callable;
this.insertCheckStyle = checkStyle;
}
|
public void setCustomSQLUpdate(String customSQLUpdate,
boolean callable,
ExecuteUpdateResultCheckStyle checkStyle) {
this.customSQLUpdate = customSQLUpdate;
this.customUpdateCallable = callable;
this.updateCheckStyle = checkStyle;
}
|
public void setElement(Value element) {
this.element = element;
}
|
public void setElementNodeName(String elementNodeName) {
this.elementNodeName = elementNodeName;
}
|
public void setEmbedded(boolean embedded) {
this.embedded = embedded;
}
|
public void setExtraLazy(boolean extraLazy) {
this.extraLazy = extraLazy;
}
|
public void setFetchMode(FetchMode fetchMode) {
this.fetchMode = fetchMode;
}
|
public void setInverse(boolean inverse) {
this.inverse = inverse;
}
|
public void setKey(KeyValue key) {
this.key = key;
}
|
public void setLazy(boolean lazy) {
this.lazy = lazy;
}
|
public void setLoaderName(String name) {
this.loaderName = name==null ? null : name.intern();
}
|
public void setManyToManyOrdering(String orderFragment) {
this.manyToManyOrderBy = orderFragment;
}
|
public void setManyToManyWhere(String manyToManyWhere) {
this.manyToManyWhere = manyToManyWhere;
}
|
public void setMutable(boolean mutable) {
this.mutable = mutable;
}
|
public void setNodeName(String nodeName) {
this.nodeName = nodeName;
}
|
public void setOptimisticLocked(boolean optimisticLocked) {
this.optimisticLocked = optimisticLocked;
}
|
public void setOrderBy(String orderBy) {
this.orderBy = orderBy;
}
|
public void setOrphanDelete(boolean orphanDelete) {
this.orphanDelete = orphanDelete;
}
|
public void setOwner(PersistentClass owner) {
this.owner = owner;
}
|
public void setReferencedPropertyName(String propertyRef) {
this.referencedPropertyName = propertyRef==null ? null : propertyRef.intern();
}
|
public void setRole(String role) {
this.role = role==null ? null : role.intern();
}
|
public void setSorted(boolean sorted) {
this.sorted = sorted;
}
|
public void setSubselectLoadable(boolean subqueryLoadable) {
this.subselectLoadable = subqueryLoadable;
}
|
public void setTypeName(String typeName) {
this.typeName = typeName;
}
|
public void setTypeParameters(Properties parameterMap) {
this.typeParameters = parameterMap;
}
|
public void setTypeUsingReflection(String className,
String propertyName) {
}
|
public void setWhere(String where) {
this.where = where;
}
|
public String toString() {
return getClass().getName() + '(" + getRole() + ')";
}
|
public void validate(Mapping mapping) throws MappingException {
if ( getKey().isCascadeDeleteEnabled() && ( !isInverse() || !isOneToMany() ) ) {
throw new MappingException(
"only inverse one-to-many associations may use on-delete=\"cascade\": "
+ getRole() );
}
if ( !getKey().isValid( mapping ) ) {
throw new MappingException(
"collection foreign key mapping has wrong number of columns: "
+ getRole()
+ " type: "
+ getKey().getType().getName() );
}
if ( !getElement().isValid( mapping ) ) {
throw new MappingException(
"collection element mapping has wrong number of columns: "
+ getRole()
+ " type: "
+ getElement().getType().getName() );
}
checkColumnDuplication();
if ( elementNodeName!=null && elementNodeName.startsWith("@") ) {
throw new MappingException("element node must not be an attribute: " + elementNodeName );
}
if ( elementNodeName!=null && elementNodeName.equals(".") ) {
throw new MappingException("element node must not be the parent: " + elementNodeName );
}
if ( nodeName!=null && nodeName.indexOf('@") >-1 ) {
throw new MappingException("collection node must not be an attribute: " + elementNodeName );
}
}
|