/** * must only be used on second level phases (<join> has to be settled already) */ public static PropertyHolder buildPropertyHolder( PersistentClass persistentClass, Map<String, Join> joins, MetadataBuildingContext context, Map<XClass, InheritanceState> inheritanceStatePerClass) { return new ClassPropertyHolder( persistentClass, null, joins, context, inheritanceStatePerClass ); } }
public void addProperty(Property prop, Ejb3Column[] columns, XClass declaringClass) { //Ejb3Column.checkPropertyConsistency( ); //already called earlier if ( columns != null && columns[0].isSecondary() ) { //TODO move the getJoin() code here? final Join join = columns[0].getJoin(); addPropertyToJoin( prop, declaringClass, join ); } else { addProperty( prop, declaringClass ); } }
public void addProperty(Property prop, XClass declaringClass) { if ( prop.getValue() instanceof Component ) { //TODO handle quote and non quote table comparison String tableName = prop.getValue().getTable().getName(); if ( getJoinsPerRealTableName().containsKey( tableName ) ) { final Join join = getJoinsPerRealTableName().get( tableName ); addPropertyToJoin( prop, declaringClass, join ); } else { addPropertyToPersistentClass( prop, declaringClass ); } } else { addPropertyToPersistentClass( prop, declaringClass ); } }
private void addPropertyToPersistentClass(Property prop, XClass declaringClass) { if ( declaringClass != null ) { final InheritanceState inheritanceState = inheritanceStatePerClass.get( declaringClass ); if ( inheritanceState == null ) { throw new AssertionFailure( "Declaring class is not found in the inheritance state hierarchy: " + declaringClass ); } if ( inheritanceState.isEmbeddableSuperclass() ) { persistentClass.addMappedsuperclassProperty(prop); addPropertyToMappedSuperclass( prop, declaringClass ); } else { persistentClass.addProperty( prop ); } } else { persistentClass.addProperty( prop ); } }
public String getEntityOwnerClassName() { return getClassName(); }
public void addProperty(Property prop) { if ( prop.getValue() instanceof Component ) { //TODO handle quote and non quote table comparison String tableName = prop.getValue().getTable().getName(); if ( getJoinsPerRealTableName().containsKey( tableName ) ) { getJoinsPerRealTableName().get( tableName ).addProperty( prop ); } else { persistentClass.addProperty( prop ); } } else { persistentClass.addProperty( prop ); } }
public void addProperty(Property prop, Ejb3Column[] columns) { //Ejb3Column.checkPropertyConsistency( ); //already called earlier if ( columns[0].isSecondary() ) { //TODO move the getJoin() code here? columns[0].getJoin().addProperty( prop ); } else { addProperty( prop ); } }
private void addPropertyToMappedSuperclass(Property prop, XClass declaringClass) { final ExtendedMappings mappings = getMappings(); final Class type = mappings.getReflectionManager().toClass( declaringClass ); MappedSuperclass superclass = mappings.getMappedSuperclass( type ); superclass.addDeclaredProperty( prop ); }
public ClassPropertyHolder( PersistentClass persistentClass, XClass entityXClass, Map<String, Join> joins, MetadataBuildingContext context, Map<XClass, InheritanceState> inheritanceStatePerClass) { super( persistentClass.getEntityName(), null, entityXClass, context ); this.persistentClass = persistentClass; this.joins = joins; this.inheritanceStatePerClass = inheritanceStatePerClass; this.attributeConversionInfoMap = buildAttributeConversionInfoMap( entityXClass ); }
private void addPropertyToJoin(Property prop, XClass declaringClass, Join join) { if ( declaringClass != null ) { final InheritanceState inheritanceState = inheritanceStatePerClass.get( declaringClass ); if ( inheritanceState == null ) { throw new AssertionFailure( "Declaring class is not found in the inheritance state hierarchy: " + declaringClass ); } if ( inheritanceState.isEmbeddableSuperclass() ) { join.addMappedsuperclassProperty(prop); addPropertyToMappedSuperclass( prop, declaringClass ); } else { join.addProperty( prop ); } } else { join.addProperty( prop ); } }
public String getEntityOwnerClassName() { return getClassName(); }
private void addPropertyToMappedSuperclass(Property prop, XClass declaringClass) { final Mappings mappings = getMappings(); final Class type = mappings.getReflectionManager().toClass( declaringClass ); MappedSuperclass superclass = mappings.getMappedSuperclass( type ); superclass.addDeclaredProperty( prop ); }
public ClassPropertyHolder( PersistentClass persistentClass, XClass entityXClass, Map<String, Join> joins, MetadataBuildingContext context, Map<XClass, InheritanceState> inheritanceStatePerClass) { super( persistentClass.getEntityName(), null, entityXClass, context ); this.persistentClass = persistentClass; this.joins = joins; this.inheritanceStatePerClass = inheritanceStatePerClass; this.attributeConversionInfoMap = buildAttributeConversionInfoMap( entityXClass ); }
public void addProperty(Property prop, XClass declaringClass) { if ( prop.getValue() instanceof Component ) { //TODO handle quote and non quote table comparison String tableName = prop.getValue().getTable().getName(); if ( getJoinsPerRealTableName().containsKey( tableName ) ) { final Join join = getJoinsPerRealTableName().get( tableName ); addPropertyToJoin( prop, declaringClass, join ); } else { addPropertyToPersistentClass( prop, declaringClass ); } } else { addPropertyToPersistentClass( prop, declaringClass ); } }
public void addProperty(Property prop, Ejb3Column[] columns, XClass declaringClass) { //Ejb3Column.checkPropertyConsistency( ); //already called earlier if ( columns != null && columns[0].isSecondary() ) { //TODO move the getJoin() code here? final Join join = columns[0].getJoin(); addPropertyToJoin( prop, declaringClass, join ); } else { addProperty( prop, declaringClass ); } }
public static PropertyHolder buildPropertyHolder( XClass clazzToProcess, PersistentClass persistentClass, EntityBinder entityBinder, MetadataBuildingContext context, Map<XClass, InheritanceState> inheritanceStatePerClass) { return new ClassPropertyHolder( persistentClass, clazzToProcess, entityBinder, context, inheritanceStatePerClass ); }
private void addPropertyToPersistentClass(Property prop, XClass declaringClass) { if ( declaringClass != null ) { final InheritanceState inheritanceState = inheritanceStatePerClass.get( declaringClass ); if ( inheritanceState == null ) { throw new AssertionFailure( "Declaring class is not found in the inheritance state hierarchy: " + declaringClass ); } if ( inheritanceState.isEmbeddableSuperclass() ) { persistentClass.addMappedsuperclassProperty(prop); addPropertyToMappedSuperclass( prop, declaringClass ); } else { persistentClass.addProperty( prop ); } } else { persistentClass.addProperty( prop ); } }
public String getEntityOwnerClassName() { return getClassName(); }
private void addPropertyToMappedSuperclass(Property prop, XClass declaringClass) { final Mappings mappings = getMappings(); final Class type = mappings.getReflectionManager().toClass( declaringClass ); MappedSuperclass superclass = mappings.getMappedSuperclass( type ); superclass.addDeclaredProperty( prop ); }
public void addProperty(Property prop, XClass declaringClass) { if ( prop.getValue() instanceof Component ) { //TODO handle quote and non quote table comparison String tableName = prop.getValue().getTable().getName(); if ( getJoinsPerRealTableName().containsKey( tableName ) ) { final Join join = getJoinsPerRealTableName().get( tableName ); addPropertyToJoin( prop, declaringClass, join ); } else { addPropertyToPersistentClass( prop, declaringClass ); } } else { addPropertyToPersistentClass( prop, declaringClass ); } }