private Object unproxy(Object instance, InstanceInitializer objectInitializer) { if ( instance == null ) { return null; } return objectInitializer.unproxy( instance ); }
private Object unproxy(Object instance, InstanceInitializer objectInitializer) { if ( instance == null ) { return null; } return objectInitializer.unproxy( instance ); }
/** * Return the id used for indexing if possible * An IllegalStateException otherwise * <p> * If the id is provided, we can't extract it from the entity */ @Override public Serializable getId(Object entity) { if ( entity == null || idPropertyMetadata.getPropertyAccessorName() == null || idProvided ) { throw new IllegalStateException( "Cannot guess id from entity" ); } Object unproxiedEntity = getInstanceInitializer().unproxy( entity ); return (Serializable) ReflectionHelper.getMemberValue( unproxiedEntity, idPropertyMetadata.getPropertyAccessor() ); }
/** * Return the id used for indexing if possible * An IllegalStateException otherwise * <p> * If the id is provided, we can't extract it from the entity */ @Override public Serializable getId(Object entity) { if ( entity == null || idPropertyMetadata.getPropertyAccessorName() == null || idProvided ) { throw new IllegalStateException( "Cannot guess id from entity" ); } Object unproxiedEntity = getInstanceInitializer().unproxy( entity ); return (Serializable) ReflectionHelper.getMemberValue( unproxiedEntity, idPropertyMetadata.getPropertyAccessor() ); }
for ( ContainedInMetadata containedInMetadata : typeMetadata.getContainedInMetadata() ) { XMember member = containedInMetadata.getContainedInMember(); Object unproxiedInstance = instanceInitializer.unproxy( instance );
for ( ContainedInMetadata containedInMetadata : typeMetadata.getContainedInMetadata() ) { XMember member = containedInMetadata.getContainedInMember(); Object unproxiedInstance = instanceInitializer.unproxy( instance );
for ( Object o : queryResultList ) { Class<?> loadedType = instanceInitializer.getClass( o ); Object unproxiedObject = instanceInitializer.unproxy( o ); IndexedTypeIdentifier type = integrator.getIndexBindings().keyFromPojoType( loadedType ); DocumentBuilderIndexedEntity documentBuilder = getDocumentBuilder( type, integrator );