public PersistentClass getPersistentClass() { return component.getOwner(); }
/** * @deprecated User {@link Component#Component(MetadataBuildingContext, Component)} instead. */ @Deprecated public Component(MetadataImplementor metadata, Component component) throws MappingException { this( metadata, component.getTable(), component.getOwner() ); }
public boolean dependentUpon( CopyIdentifierComponentSecondPass other ) { return this.referencedEntityName.equals( other.component.getOwner().getEntityName() ); } }
public Component(MetadataBuildingContext metadata, Component component) throws MappingException { this( metadata, component.getTable(), component.getOwner() ); }
public String getEntityOwnerClassName() { return component.getOwner().getClassName(); }
public KeyValue getIdentifier() { return component.getOwner().getIdentifier(); }
private String extractUserPropertyName(String redundantString, String propertyName) { String result = null; String className = component.getOwner().getClassName(); if ( propertyName.startsWith( className ) && propertyName.length() > className.length() + 2 + redundantString.length() // .id. && propertyName.substring( className.length() + 1, className.length() + 1 + redundantString.length() ).equals( redundantString ) ) { //remove id we might be in a @IdCLass case result = className + propertyName.substring( className.length() + 1 + redundantString.length() ); } return result; }
property.setPersistentClass( component.getOwner() ); property.setPropertyAccessorName( referencedProperty.getPropertyAccessorName() ); Component value = new Component( buildingContext, component.getOwner() ); Property componentProperty = createComponentProperty( referencedValue.getOwner(), isExplicitReference, columnByReferencedName, index, referencedComponentProperty ); value.addProperty( componentProperty ); Property componentProperty = createSimpleProperty( referencedValue.getOwner(), isExplicitReference, columnByReferencedName, index, referencedComponentProperty ); value.addProperty( componentProperty );
new Component( context, (Join) columnOwner ); embeddedComp.setEmbedded( true ); embeddedComp.setComponentClassName( embeddedComp.getOwner().getClassName() ); for (Property property : properties) { Property clone = BinderHelper.shallowCopy( property );
public static Component createComponent( PropertyHolder propertyHolder, PropertyData inferredData, boolean isComponentEmbedded, boolean isIdentifierMapper, MetadataBuildingContext context) { Component comp = new Component( context, propertyHolder.getPersistentClass() ); comp.setEmbedded( isComponentEmbedded ); //yuk comp.setTable( propertyHolder.getTable() ); //FIXME shouldn't identifier mapper use getClassOrElementName? Need to be checked. if ( isIdentifierMapper || ( isComponentEmbedded && inferredData.getPropertyName() == null ) ) { comp.setComponentClassName( comp.getOwner().getClassName() ); } else { comp.setComponentClassName( inferredData.getClassOrElementName() ); } return comp; }
public PersistentClass getPersistentClass() { return component.getOwner(); }
property.setPersistentClass( component.getOwner() ); property.setPropertyAccessorName( referencedProperty.getPropertyAccessorName() ); SimpleValue value = new SimpleValue( buildingContext, component.getTable() );
if ( componentBinding.getOwner().hasPojoRepresentation() ) { log.debugf( "Binding virtual component [%s] to owner class [%s]", role, componentBinding.getOwner().getClassName() ); componentBinding.setComponentClassName( componentBinding.getOwner().getClassName() ); componentBinding.setComponentClassName( explicitComponentClassName ); else if ( componentBinding.getOwner().hasPojoRepresentation() ) { log.tracef( "Attempting to determine component class by reflection %s", role ); final Class reflectedComponentClass; componentBinding.getOwner().getTable().createUniqueKey( cols );
private String extractUserPropertyName(String redundantString, String propertyName) { String result = null; String className = component.getOwner().getClassName(); if ( propertyName.startsWith( className ) && propertyName.length() > className.length() + 2 + redundantString.length() // .id. && propertyName.substring( className.length() + 1, className.length() + 1 + redundantString.length() ).equals( redundantString ) ) { //remove id we might be in a @IdCLass case result = className + propertyName.substring( className.length() + 1 + redundantString.length() ); } return result; }
public String getEntityOwnerClassName() { return component.getOwner().getClassName(); }
public KeyValue getIdentifier() { return component.getOwner().getIdentifier(); }
try { if ( component.getOwner().getIdentifierMapper() == null ) return null; StringTokenizer st = new StringTokenizer( propertyName, ".", false ); while ( st.hasMoreElements() ) { String element = (String) st.nextElement(); if ( property == null ) { property = component.getOwner().getIdentifierMapper().getProperty( element );
public static Component createComponent(PropertyHolder propertyHolder, PropertyData inferredData, boolean isComponentEmbedded, boolean isIdentifierMapper) { Component comp = new Component( propertyHolder.getPersistentClass() ); comp.setEmbedded( isComponentEmbedded ); //yuk comp.setTable( propertyHolder.getTable() ); //FIXME shouldn't identifier mapper use getClassOrElementName? Need to be checked. if ( isIdentifierMapper || ( isComponentEmbedded && inferredData.getPropertyName() == null ) ) { comp.setComponentClassName( comp.getOwner().getClassName() ); } else { comp.setComponentClassName( inferredData.getClassOrElementName() ); } comp.setNodeName( inferredData.getPropertyName() ); return comp; }