public Declarer getSubclassPropertyDeclarer(String propertyPath) { int tableIndex = getSubclassPropertyTableNumber( propertyPath ); if ( tableIndex == 0 ) { return Declarer.CLASS; } else if ( isClassOrSuperclassTable( tableIndex ) ) { return Declarer.SUPERCLASS; } else { return Declarer.SUBCLASS; } }
public String[] toColumns(final String alias, final String propertyName) throws QueryException { return super.toColumns( AbstractEntityPersister.generateTableAlias( alias, persister.getSubclassPropertyTableNumber( propertyName ) ), propertyName ); }
public String[] toColumns(String name, final int i) { final String alias = generateTableAlias( name, getSubclassPropertyTableNumber( i ) ); String[] cols = getSubclassPropertyColumnNames( i ); String[] templates = getSubclassPropertyFormulaTemplateClosure()[i]; String[] result = new String[cols.length]; for ( int j = 0; j < cols.length; j++ ) { if ( cols[j] == null ) { result[j] = StringHelper.replace( templates[j], Template.TEMPLATE, alias ); } else { result[j] = StringHelper.qualify( alias, cols[j] ); } } return result; }
int tableNumber = getSubclassPropertyTableNumber( propertyNumber ); tableNumbers.add( tableNumber );
final String uniquePropertyTableAlias = generateTableAlias( rooAlias, getSubclassPropertyTableNumber( uniquePropertyIndex ) ); String sep = "";
rootPropertyName return index == -1 ? 0 : getSubclassPropertyTableNumber( index );
public Declarer getSubclassPropertyDeclarer(String propertyPath) { int tableIndex = getSubclassPropertyTableNumber( propertyPath ); if ( tableIndex == 0 ) { return Declarer.CLASS; } else if ( isClassOrSuperclassTable( tableIndex ) ) { return Declarer.SUPERCLASS; } else { return Declarer.SUBCLASS; } }
public Declarer getSubclassPropertyDeclarer(String propertyPath) { int tableIndex = getSubclassPropertyTableNumber( propertyPath ); if ( tableIndex == 0 ) { return Declarer.CLASS; } else if ( isClassOrSuperclassTable( tableIndex ) ) { return Declarer.SUPERCLASS; } else { return Declarer.SUBCLASS; } }
public String[] toColumns(final String alias, final String propertyName) throws QueryException { return super.toColumns( persister.generateTableAlias( alias, persister.getSubclassPropertyTableNumber(propertyName) ), propertyName ); }
public String[] toColumns(final String alias, final String propertyName) throws QueryException { return super.toColumns( persister.generateTableAlias( alias, persister.getSubclassPropertyTableNumber(propertyName) ), propertyName ); }
public String[] toColumns(final String alias, final String propertyName) throws QueryException { return super.toColumns( persister.generateTableAlias( alias, persister.getSubclassPropertyTableNumber(propertyName) ), propertyName ); }
int tableNumber = getSubclassPropertyTableNumber( propertyNumber ); tableNumbers.add( new Integer( tableNumber ) );
int tableNumber = getSubclassPropertyTableNumber( propertyNumber ); tableNumbers.add( tableNumber );
int tableNumber = getSubclassPropertyTableNumber( propertyNumber ); tableNumbers.add( tableNumber );
@Override public boolean isForeignJoinColumn(EntityType<?> ownerType, String attributeName) { AbstractEntityPersister persister = getEntityPersister(ownerType); Type propertyType = persister.getPropertyType(attributeName); if (propertyType instanceof OneToOneType) { OneToOneType oneToOneType = (OneToOneType) propertyType; // It is foreign if there is a mapped by attribute // But as of Hibernate 5.4 we noticed that we have to treat nullable one-to-ones as "foreign" as well return (oneToOneType).getRHSUniqueKeyPropertyName() != null || isNullable(oneToOneType); } // Every entity persister has "owned" properties on table number 0, others have higher numbers int tableNumber = persister.getSubclassPropertyTableNumber(attributeName); return tableNumber >= persister.getEntityMetamodel().getSubclassEntityNames().size(); }
public String[] toColumns(String name, final int i) { final String alias = generateTableAlias( name, getSubclassPropertyTableNumber( i ) ); String[] cols = getSubclassPropertyColumnNames( i ); String[] templates = getSubclassPropertyFormulaTemplateClosure()[i]; String[] result = new String[cols.length]; for ( int j = 0; j < cols.length; j++ ) { if ( cols[j] == null ) { result[j] = StringHelper.replace( templates[j], Template.TEMPLATE, alias ); } else { result[j] = StringHelper.qualify( alias, cols[j] ); } } return result; }
public String[] toColumns(String name, final int i) { final String alias = generateTableAlias( name, getSubclassPropertyTableNumber( i ) ); String[] cols = getSubclassPropertyColumnNames( i ); String[] templates = getSubclassPropertyFormulaTemplateClosure()[i]; String[] result = new String[cols.length]; for ( int j = 0; j < cols.length; j++ ) { if ( cols[j] == null ) { result[j] = StringHelper.replace( templates[j], Template.TEMPLATE, alias ); } else { result[j] = StringHelper.qualify( alias, cols[j] ); } } return result; }
return index==-1 ? 0 : getSubclassPropertyTableNumber(index);
return index==-1 ? 0 : getSubclassPropertyTableNumber(index);
return index==-1 ? 0 : getSubclassPropertyTableNumber(index); int tableIndex = getSubclassPropertyTableNumber( propertyPath ); if ( tableIndex == 0 ) { return Declarer.CLASS;