entityDescriptor.setEntityName( entitySource.getEntityNamingSource().getEntityName() ); entityDescriptor.setJpaEntityName( entitySource.getEntityNamingSource().getJpaEntityName() ); entityDescriptor.setClassName( entitySource.getEntityNamingSource().getClassName() );
public void bindEntity() { persistentClass.setAbstract( annotatedClass.isAbstract() ); persistentClass.setClassName( annotatedClass.getName() ); persistentClass.setJpaEntityName(name);
public void bindEntity() { persistentClass.setAbstract( annotatedClass.isAbstract() ); persistentClass.setClassName( annotatedClass.getName() ); persistentClass.setNodeName( name );
private static void bindPojoRepresentation(Element node, PersistentClass entity, Mappings mappings, java.util.Map metaTags) { String className = getClassName( node.attribute( "name" ), mappings ); String proxyName = getClassName( node.attribute( "proxy" ), mappings ); entity.setClassName( className ); if ( proxyName != null ) { entity.setProxyInterfaceName( proxyName ); entity.setLazy( true ); } else if ( entity.isLazy() ) { entity.setProxyInterfaceName( className ); } Element tuplizer = locateTuplizerDefinition( node, EntityMode.POJO ); if ( tuplizer != null ) { entity.addTuplizer( EntityMode.POJO, tuplizer.attributeValue( "class" ) ); } }
private static void bindPojoRepresentation(Element node, PersistentClass entity, Mappings mappings, java.util.Map metaTags) { String className = getClassName( node.attribute( "name" ), mappings ); String proxyName = getClassName( node.attribute( "proxy" ), mappings ); entity.setClassName( className ); if ( proxyName != null ) { entity.setProxyInterfaceName( proxyName ); entity.setLazy( true ); } else if ( entity.isLazy() ) { entity.setProxyInterfaceName( className ); } }
private static void bindPojoRepresentation(Element node, PersistentClass entity, Mappings mappings, java.util.Map metaTags) { String className = getClassName( node.attribute( "name" ), mappings ); String proxyName = getClassName( node.attribute( "proxy" ), mappings ); entity.setClassName( className ); if ( proxyName != null ) { entity.setProxyInterfaceName( proxyName ); entity.setLazy( true ); } else if ( entity.isLazy() ) { entity.setProxyInterfaceName( className ); } Element tuplizer = locateTuplizerDefinition( node, EntityMode.POJO ); if ( tuplizer != null ) { entity.addTuplizer( EntityMode.POJO, tuplizer.attributeValue( "class" ) ); } }
private static void bindPojoRepresentation(Element node, PersistentClass entity, Mappings mappings, java.util.Map metaTags) { String className = getClassName( node.attribute( "name" ), mappings ); String proxyName = getClassName( node.attribute( "proxy" ), mappings ); entity.setClassName( className ); if ( proxyName != null ) { entity.setProxyInterfaceName( proxyName ); entity.setLazy( true ); } else if ( entity.isLazy() ) { entity.setProxyInterfaceName( className ); } Element tuplizer = locateTuplizerDefinition( node, EntityMode.POJO ); if ( tuplizer != null ) { entity.addTuplizer( EntityMode.POJO, tuplizer.attributeValue( "class" ) ); } }
/** * Binds the specified persistant class to the runtime model based on the * properties defined in the domain class * * @param domainClass The Grails domain class * @param persistentClass The persistant class * @param mappings Existing mappings */ private static void bindClass(GrailsDomainClass domainClass, PersistentClass persistentClass, Mappings mappings) { // set lazy loading for now persistentClass.setLazy(true); persistentClass.setEntityName(domainClass.getFullName()); persistentClass.setProxyInterfaceName(domainClass.getFullName()); persistentClass.setClassName(domainClass.getFullName()); // set dynamic insert to false persistentClass.setDynamicInsert(false); // set dynamic update to false persistentClass.setDynamicUpdate(false); // set select before update to false persistentClass.setSelectBeforeUpdate(false); // add import to mappings if (mappings.isAutoImport() && persistentClass.getEntityName().indexOf('.') > 0) { mappings.addImport(persistentClass.getEntityName(), StringHelper.unqualify(persistentClass.getEntityName())); } }
public void bindEntity() { persistentClass.setAbstract( annotatedClass.isAbstract() ); persistentClass.setClassName( annotatedClass.getName() );
/** * Binds the specified persistant class to the runtime model based on the * properties defined in the domain class * * @param domainClass The Grails domain class * @param persistentClass The persistant class * @param mappings Existing mappings */ protected void bindClass(PersistentEntity domainClass, PersistentClass persistentClass, Mappings mappings) { // set lazy loading for now persistentClass.setLazy(true); final String entityName = domainClass.getName(); persistentClass.setEntityName(entityName); persistentClass.setJpaEntityName(unqualify(entityName)); persistentClass.setProxyInterfaceName(entityName); persistentClass.setClassName(entityName); // set dynamic insert to false persistentClass.setDynamicInsert(false); // set dynamic update to false persistentClass.setDynamicUpdate(false); // set select before update to false persistentClass.setSelectBeforeUpdate(false); // add import to mappings if (mappings.isAutoImport() && persistentClass.getEntityName().indexOf('.') > 0) { mappings.addImport(persistentClass.getEntityName(), unqualify(persistentClass.getEntityName())); } }
public void bindEntity() { persistentClass.setAbstract( annotatedClass.isAbstract() ); persistentClass.setClassName( annotatedClass.getName() ); persistentClass.setNodeName( name ); persistentClass.setJpaEntityName(name);
public void bindEntity() { persistentClass.setAbstract( annotatedClass.isAbstract() ); persistentClass.setClassName( annotatedClass.getName() ); persistentClass.setNodeName( name ); persistentClass.setJpaEntityName(name);
public void bindEntity() { persistentClass.setAbstract( annotatedClass.isAbstract() ); persistentClass.setClassName( annotatedClass.getName() ); persistentClass.setJpaEntityName(name);
entityDescriptor.setEntityName( entitySource.getEntityNamingSource().getEntityName() ); entityDescriptor.setJpaEntityName( entitySource.getEntityNamingSource().getJpaEntityName() ); entityDescriptor.setClassName( entitySource.getEntityNamingSource().getClassName() );