/** * {@inheritDoc} * * Warning: * When there are duplicated property names in the subclasses * then this method may return the wrong results. * To ensure correct results, this method should only be used when * {@literal this} is the concrete EntityPersister (since the * concrete EntityPersister cannot have duplicated property names). */ @Override public String[] getPropertyColumnNames(String propertyName) { return propertyMapping.getColumnNames( propertyName ); }
/** * {@inheritDoc} * * Warning: * When there are duplicated property names in the subclasses * then this method may return the wrong results. * To ensure correct results, this method should only be used when * {@literal this} is the concrete EntityPersister (since the * concrete EntityPersister cannot have duplicated property names). */ @Override public Type toType(String propertyName) throws QueryException { return propertyMapping.toType( propertyName ); }
private void initDiscriminatorPropertyPath(Mapping mapping) throws MappingException { propertyMapping.initPropertyPaths( ENTITY_CLASS, getDiscriminatorType(), new String[] {getDiscriminatorColumnName()}, new String[] {getDiscriminatorColumnReaders()}, new String[] {getDiscriminatorColumnReaderTemplate()}, new String[] {getDiscriminatorFormulaTemplate()}, getFactory() ); }
private EntityLoader getAppropriateUniqueKeyLoader(String propertyName, SharedSessionContractImplementor session) { final boolean useStaticLoader = !session.getLoadQueryInfluencers().hasEnabledFilters() && !session.getLoadQueryInfluencers().hasEnabledFetchProfiles() && propertyName.indexOf( '.' ) < 0; //ugly little workaround for fact that createUniqueKeyLoaders() does not handle component properties if ( useStaticLoader ) { return (EntityLoader) uniqueKeyLoaders.get( propertyName ); } else { return createUniqueKeyLoader( propertyMapping.toType( propertyName ), propertyMapping.toColumns( propertyName ), session.getLoadQueryInfluencers() ); } }
hasSubselectLoadableCollections = persistentClass.hasSubselectLoadableCollections(); propertyMapping = new BasicEntityPropertyMapping( this );
/** * {@inheritDoc} * * Warning: * When there are duplicated property names in the subclasses * then this method may return the wrong results. * To ensure correct results, this method should only be used when * {@literal this} is the concrete EntityPersister (since the * concrete EntityPersister cannot have duplicated property names). */ @Override public String[] toColumns(String alias, String propertyName) throws QueryException { return propertyMapping.toColumns( alias, propertyName ); }
private EntityLoader getAppropriateUniqueKeyLoader(String propertyName, SessionImplementor session) { final boolean useStaticLoader = !session.getLoadQueryInfluencers().hasEnabledFilters() && !session.getLoadQueryInfluencers().hasEnabledFetchProfiles() && propertyName.indexOf('.')<0; //ugly little workaround for fact that createUniqueKeyLoaders() does not handle component properties if ( useStaticLoader ) { return ( EntityLoader ) uniqueKeyLoaders.get( propertyName ); } else { return createUniqueKeyLoader( propertyMapping.toType( propertyName ), propertyMapping.toColumns( propertyName ), session.getLoadQueryInfluencers() ); } }
hasSubselectLoadableCollections = persistentClass.hasSubselectLoadableCollections(); propertyMapping = new BasicEntityPropertyMapping( this );
public String[] toColumns(String alias, String propertyName) throws QueryException { return propertyMapping.toColumns( alias, propertyName ); }
/** * {@inheritDoc} * * Warning: * When there are duplicated property names in the subclasses * then this method may return the wrong results. * To ensure correct results, this method should only be used when * {@literal this} is the concrete EntityPersister (since the * concrete EntityPersister cannot have duplicated property names). */ @Override public Type getPropertyType(String propertyName) throws MappingException { return propertyMapping.toType( propertyName ); }
private EntityLoader getAppropriateUniqueKeyLoader(String propertyName, SessionImplementor session) { final boolean useStaticLoader = !session.getLoadQueryInfluencers().hasEnabledFilters() && !session.getLoadQueryInfluencers().hasEnabledFetchProfiles() && propertyName.indexOf('.')<0; //ugly little workaround for fact that createUniqueKeyLoaders() does not handle component properties if ( useStaticLoader ) { return ( EntityLoader ) uniqueKeyLoaders.get( propertyName ); } else { return createUniqueKeyLoader( propertyMapping.toType( propertyName ), propertyMapping.toColumns( propertyName ), session.getLoadQueryInfluencers() ); } }
/** * {@inheritDoc} * * Warning: * When there are duplicated property names in the subclasses * then this method may return the wrong results. * To ensure correct results, this method should only be used when * {@literal this} is the concrete EntityPersister (since the * concrete EntityPersister cannot have duplicated property names). */ @Override public String[] toColumns(String propertyName) throws QueryException { return propertyMapping.getColumnNames( propertyName ); }
private void initIdentifierPropertyPaths(Mapping mapping) throws MappingException { String idProp = getIdentifierPropertyName(); if ( idProp != null ) { propertyMapping.initPropertyPaths( idProp, getIdentifierType(), getIdentifierColumnNames(), getIdentifierColumnReaders(), getIdentifierColumnReaderTemplates(), null, mapping ); } if ( entityMetamodel.getIdentifierProperty().isEmbedded() ) { propertyMapping.initPropertyPaths( null, getIdentifierType(), getIdentifierColumnNames(), getIdentifierColumnReaders(), getIdentifierColumnReaderTemplates(), null, mapping ); } if ( !entityMetamodel.hasNonIdentifierPropertyNamedId() ) { propertyMapping.initPropertyPaths( ENTITY_ID, getIdentifierType(), getIdentifierColumnNames(), getIdentifierColumnReaders(), getIdentifierColumnReaderTemplates(), null, mapping ); } }
hasSubselectLoadableCollections = persistentClass.hasSubselectLoadableCollections(); propertyMapping = new BasicEntityPropertyMapping( this );
public String[] toColumns(String alias, String propertyName) throws QueryException { return propertyMapping.toColumns( alias, propertyName ); }
Type type = propertyMapping.toType( rootPropertyName ); if ( type.isAssociationType() ) { AssociationType assocType = (AssociationType) type;
public String[] getPropertyColumnNames(String propertyName) { return propertyMapping.getColumnNames( propertyName ); }
private void initOrdinaryPropertyPaths(Mapping mapping) throws MappingException { for ( int i = 0; i < getSubclassPropertyNameClosure().length; i++ ) { propertyMapping.initPropertyPaths( getSubclassPropertyNameClosure()[i], getSubclassPropertyTypeClosure()[i], getSubclassPropertyColumnNameClosure()[i], getSubclassPropertyColumnReaderClosure()[i], getSubclassPropertyColumnReaderTemplateClosure()[i], getSubclassPropertyFormulaTemplateClosure()[i], mapping ); } }
hasSubselectLoadableCollections = persistentClass.hasSubselectLoadableCollections(); propertyMapping = new BasicEntityPropertyMapping( this );
public String[] toColumns(String alias, String propertyName) throws QueryException { return propertyMapping.toColumns( alias, propertyName ); }