private static void bindCustomSql( MappingDocument sourceDocument, EntitySource entitySource, PersistentClass entityDescriptor) { if ( entitySource.getCustomSqlInsert() != null ) { entityDescriptor.setCustomSQLInsert( entitySource.getCustomSqlInsert().getSql(), entitySource.getCustomSqlInsert().isCallable(), entitySource.getCustomSqlInsert().getCheckStyle() ); } if ( entitySource.getCustomSqlUpdate() != null ) { entityDescriptor.setCustomSQLUpdate( entitySource.getCustomSqlUpdate().getSql(), entitySource.getCustomSqlUpdate().isCallable(), entitySource.getCustomSqlUpdate().getCheckStyle() ); } if ( entitySource.getCustomSqlDelete() != null ) { entityDescriptor.setCustomSQLDelete( entitySource.getCustomSqlDelete().getSql(), entitySource.getCustomSqlDelete().isCallable(), entitySource.getCustomSqlDelete().getCheckStyle() ); } entityDescriptor.setLoaderName( entitySource.getCustomLoaderName() ); }
persistentClass.setLoaderName( loader.namedQuery() );
persistentClass.setLoaderName( loader.namedQuery() );
private static void handleCustomSQL(Element node, PersistentClass model) throws MappingException { Element element = node.element( "sql-insert" ); if ( element != null ) { boolean callable = false; callable = isCallable( element ); model.setCustomSQLInsert( element.getText(), callable ); } element = node.element( "sql-delete" ); if ( element != null ) { boolean callable = false; callable = isCallable( element ); model.setCustomSQLDelete( element.getText(), callable ); } element = node.element( "sql-update" ); if ( element != null ) { boolean callable = false; callable = isCallable( element ); model.setCustomSQLUpdate( element.getText(), callable ); } element = node.element( "loader" ); if ( element != null ) { model.setLoaderName( element.attributeValue( "query-ref" ) ); } }
private static void handleCustomSQL(Element node, PersistentClass model) throws MappingException { Element element = node.element( "sql-insert" ); if ( element != null ) { boolean callable = isCallable( element ); model.setCustomSQLInsert( element.getTextTrim(), callable, getResultCheckStyle( element, callable ) ); } element = node.element( "sql-delete" ); if ( element != null ) { boolean callable = isCallable( element ); model.setCustomSQLDelete( element.getTextTrim(), callable, getResultCheckStyle( element, callable ) ); } element = node.element( "sql-update" ); if ( element != null ) { boolean callable = isCallable( element ); model.setCustomSQLUpdate( element.getTextTrim(), callable, getResultCheckStyle( element, callable ) ); } element = node.element( "loader" ); if ( element != null ) { model.setLoaderName( element.attributeValue( "query-ref" ) ); } }
private static void handleCustomSQL(Element node, PersistentClass model) throws MappingException { Element element = node.element( "sql-insert" ); if ( element != null ) { boolean callable = isCallable( element ); model.setCustomSQLInsert( element.getTextTrim(), callable, getResultCheckStyle( element, callable ) ); } element = node.element( "sql-delete" ); if ( element != null ) { boolean callable = isCallable( element ); model.setCustomSQLDelete( element.getTextTrim(), callable, getResultCheckStyle( element, callable ) ); } element = node.element( "sql-update" ); if ( element != null ) { boolean callable = isCallable( element ); model.setCustomSQLUpdate( element.getTextTrim(), callable, getResultCheckStyle( element, callable ) ); } element = node.element( "loader" ); if ( element != null ) { model.setLoaderName( element.attributeValue( "query-ref" ) ); } }
private static void handleCustomSQL(Element node, PersistentClass model) throws MappingException { Element element = node.element( "sql-insert" ); if ( element != null ) { boolean callable = isCallable( element ); model.setCustomSQLInsert( element.getTextTrim(), callable, getResultCheckStyle( element, callable ) ); } element = node.element( "sql-delete" ); if ( element != null ) { boolean callable = isCallable( element ); model.setCustomSQLDelete( element.getTextTrim(), callable, getResultCheckStyle( element, callable ) ); } element = node.element( "sql-update" ); if ( element != null ) { boolean callable = isCallable( element ); model.setCustomSQLUpdate( element.getTextTrim(), callable, getResultCheckStyle( element, callable ) ); } element = node.element( "loader" ); if ( element != null ) { model.setLoaderName( element.attributeValue( "query-ref" ) ); } }
private static void bindCustomSql(EntitySource entitySource, PersistentClass entityDescriptor) { if ( entitySource.getCustomSqlInsert() != null ) { entityDescriptor.setCustomSQLInsert( entitySource.getCustomSqlInsert().getSql(), entitySource.getCustomSqlInsert().isCallable(), entitySource.getCustomSqlInsert().getCheckStyle() ); } if ( entitySource.getCustomSqlUpdate() != null ) { entityDescriptor.setCustomSQLUpdate( entitySource.getCustomSqlUpdate().getSql(), entitySource.getCustomSqlUpdate().isCallable(), entitySource.getCustomSqlUpdate().getCheckStyle() ); } if ( entitySource.getCustomSqlDelete() != null ) { entityDescriptor.setCustomSQLDelete( entitySource.getCustomSqlDelete().getSql(), entitySource.getCustomSqlDelete().isCallable(), entitySource.getCustomSqlDelete().getCheckStyle() ); } entityDescriptor.setLoaderName( entitySource.getCustomLoaderName() ); }
persistentClass.setLoaderName( loader.namedQuery() );
persistentClass.setLoaderName( loader.namedQuery() );
persistentClass.setLoaderName( loader.namedQuery() );