private void checkColumnDuplication() throws MappingException { HashSet cols = new HashSet(); checkColumnDuplication( cols, getKey() ); if ( isIndexed() ) { checkColumnDuplication( cols, ( (IndexedCollection) this ).getIndex() ); } if ( isIdentified() ) { checkColumnDuplication( cols, ( (IdentifierCollection) this ).getIdentifier() ); } if ( !isOneToMany() ) { checkColumnDuplication( cols, getElement() ); } }
public void validate(Mapping mapping) throws MappingException { assert getKey() != null : "Collection key not bound : " + getRole(); assert getElement() != null : "Collection element not bound : " + 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(); }
private void checkColumnDuplication() throws MappingException { HashSet cols = new HashSet(); checkColumnDuplication( cols, getKey() ); if ( isIndexed() ) { checkColumnDuplication( cols, ( (IndexedCollection) this ).getIndex() ); } if ( isIdentified() ) { checkColumnDuplication( cols, ( (IdentifierCollection) this ).getIdentifier() ); } if ( !isOneToMany() ) { checkColumnDuplication( cols, getElement() ); } }
private void checkColumnDuplication() throws MappingException { HashSet cols = new HashSet(); checkColumnDuplication( cols, getKey().getColumnIterator() ); if ( isIndexed() ) { checkColumnDuplication( cols, ( (IndexedCollection) this ) .getIndex() .getColumnIterator() ); } if ( isIdentified() ) { checkColumnDuplication( cols, ( (IdentifierCollection) this ) .getIdentifier() .getColumnIterator() ); } if ( !isOneToMany() ) { checkColumnDuplication( cols, getElement().getColumnIterator() ); } }
private void checkColumnDuplication() throws MappingException { HashSet cols = new HashSet(); checkColumnDuplication( cols, getKey().getColumnIterator() ); if ( isIndexed() ) { checkColumnDuplication( cols, ( (IndexedCollection) this ) .getIndex() .getColumnIterator() ); } if ( isIdentified() ) { checkColumnDuplication( cols, ( (IdentifierCollection) this ) .getIdentifier() .getColumnIterator() ); } if ( !isOneToMany() ) { checkColumnDuplication( cols, getElement().getColumnIterator() ); } }
private void checkColumnDuplication() throws MappingException { HashSet cols = new HashSet(); checkColumnDuplication( cols, getKey().getColumnIterator() ); if ( isIndexed() ) { checkColumnDuplication( cols, ( (IndexedCollection) this ) .getIndex() .getColumnIterator() ); } if ( isIdentified() ) { checkColumnDuplication( cols, ( (IdentifierCollection) this ) .getIdentifier() .getColumnIterator() ); } if ( !isOneToMany() ) { checkColumnDuplication( cols, getElement().getColumnIterator() ); } }
private void checkColumnDuplication() throws MappingException { HashSet cols = new HashSet(); checkColumnDuplication( cols, getKey().getColumnIterator() ); if ( isIndexed() ) { checkColumnDuplication( cols, ( (IndexedCollection) this ) .getIndex() .getColumnIterator() ); } if ( isIdentified() ) { checkColumnDuplication( cols, ( (IdentifierCollection) this ) .getIdentifier() .getColumnIterator() ); } if ( !isOneToMany() ) { checkColumnDuplication( cols, getElement().getColumnIterator() ); } }
public void validate() throws MappingException { assert getKey() != null : "Collection key not bound : " + getRole(); assert getElement() != null : "Collection element not bound : " + getRole(); if ( !getKey().isValid() ) { throw new MappingException( "collection foreign key mapping has wrong number of columns: " + getRole() + " type: " + getKey().getJavaTypeMapping().getTypeName() ); } if ( !getElement().isValid() ) { throw new MappingException( "collection element mapping has wrong number of columns: " + getRole() + " type: " + getElement().getJavaTypeMapping().getTypeName() ); } checkColumnDuplication(); }