@Override public void postInstantiate() throws MappingException { initializer = queryLoaderName == null ? createCollectionInitializer( LoadQueryInfluencers.NONE ) : new NamedQueryCollectionInitializer( queryLoaderName, this ); }
public Type getDataType() { if ( persister == null ) { if ( queryableCollection == null ) { return null; } return queryableCollection.getType(); } else { return entityType; } }
protected CollectionAction( final CollectionPersister persister, final PersistentCollection collection, final Serializable key, final SharedSessionContractImplementor session) { this.persister = persister; this.session = session; this.key = key; this.collectionRole = persister.getRole(); this.collection = collection; }
@Override public boolean indexExists(Serializable key, Object index, SharedSessionContractImplementor session) { return exists( key, incrementIndexByBase( index ), getIndexType(), sqlDetectRowByIndexString, session ); }
@Override protected String filterFragment(String alias, Set<String> treatAsDeclarations) throws MappingException { String result = super.filterFragment( alias ); if ( getElementPersister() instanceof Joinable ) { result += ( (Joinable) getElementPersister() ).oneToManyFilterFragment( alias, treatAsDeclarations ); } return result; }
@Override protected Type resolveType(QueryableCollection collectionPersister) { return collectionPersister.getElementType(); } }
@Override public boolean needsRecreate(CollectionPersister persister) { return !persister.isOneToMany(); }
@Override protected Type resolveType(QueryableCollection collectionPersister) { return collectionPersister.getIndexType(); }
/** * Constructs a PersistentCollection instance for holding an array. * * @param session The session * @param persister The persister for the array */ public PersistentArrayHolder(SharedSessionContractImplementor session, CollectionPersister persister) { super( session ); elementClass = persister.getElementClass(); }
public Type getType() { //return memberPersister.getType(); return memberPersister.getCollectionType(); }
@Override public String getSQLOrderByString(String alias) { return hasOrdering() ? orderByTranslation.injectAliases( new StandardOrderByAliasResolver( alias ) ) : ""; }
@Override public Serializable[] getSpaces() { return persister.getCollectionSpaces(); }
public CompositeElementPropertyMapping( String[] elementColumns, String[] elementColumnReaders, String[] elementColumnReaderTemplates, String[] elementFormulaTemplates, CompositeType compositeType, Mapping factory) throws MappingException { this.compositeType = compositeType; initComponentPropertyPaths(null, compositeType, elementColumns, elementColumnReaders, elementColumnReaderTemplates, elementFormulaTemplates, factory); }
@Override public Type getType() { return getElementType(); }
@Override public String getManyToManyOrderByString(String alias) { return hasManyToManyOrdering() ? manyToManyOrderByTranslation.injectAliases( new StandardOrderByAliasResolver( alias ) ) : ""; }
@Override public String[] getElementColumnNames(String alias) { return qualify( alias, elementColumnNames, elementFormulaTemplates ); }
@Override public void insertRows(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session) throws HibernateException { super.insertRows( collection, id, session ); writeIndex( collection, collection.entries( this ), id, true, session ); }
@Override public void recreate(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session) throws HibernateException { super.recreate( collection, id, session ); writeIndex( collection, collection.entries( this ), id, true, session ); }
@Override public String filterFragment(String alias) throws MappingException { String result = super.filterFragment( alias ); if ( getElementPersister() instanceof Joinable ) { result += ( (Joinable) getElementPersister() ).oneToManyFilterFragment( alias ); } return result; }
@Override public Serializable[] getSpaces() { return persister.getCollectionSpaces(); }