protected final void initProjection( final String projectionString, final String whereString, final String orderByString, final String groupByString, final LockOptions lockOptions) throws MappingException { walkEntityTree( persister, getAlias() ); persisters = new Loadable[0]; initStatementString(projectionString, whereString, orderByString, groupByString, lockOptions); }
protected final void initAll( final String whereString, final String orderByString, final LockOptions lockOptions, final AssociationInitCallback callback) throws MappingException { walkEntityTree( persister, getAlias() ); List allAssociations = new ArrayList(); allAssociations.addAll( associations ); allAssociations.add( OuterJoinableAssociation.createRoot( persister.getEntityType(), alias, getFactory() ) ); initPersisters( allAssociations, lockOptions, callback ); initStatementString( whereString, orderByString, lockOptions ); }
private void initStatementString( final String projection, final String condition, final String orderBy, final String groupBy, final LockOptions lockOptions) throws MappingException { final int joins = countEntityPersisters( associations ); suffixes = BasicLoader.generateSuffixes( joins + 1 ); JoinFragment ojf = mergeOuterJoins( associations ); Select select = new Select( getDialect() ) .setLockOptions( lockOptions ) .setSelectClause( projection == null ? persister.selectFragment( alias, suffixes[joins] ) + selectString( associations ) : projection ) .setFromClause( getDialect().appendLockHint( lockOptions, persister.fromTableFragment( alias ) ) + persister.fromJoinFragment( alias, true, true ) ) .setWhereClause( condition ) .setOuterJoins( ojf.toFromFragmentString(), ojf.toWhereFragmentString() + getWhereFragment() ) .setOrderByClause( orderBy( associations, orderBy ) ) .setGroupByClause( groupBy );
protected final void initProjection( final String projectionString, final String whereString, final String orderByString, final String groupByString, final LockOptions lockOptions) throws MappingException { walkEntityTree( persister, getAlias() ); persisters = new Loadable[0]; initStatementString(projectionString, whereString, orderByString, groupByString, lockOptions); }
protected final void initProjection( final String projectionString, final String whereString, final String orderByString, final String groupByString, final LockMode lockMode) throws MappingException { walkEntityTree( persister, getAlias() ); persisters = new Loadable[0]; initStatementString(projectionString, whereString, orderByString, groupByString, lockMode); }
protected final void initProjection( final String projectionString, final String whereString, final String orderByString, final String groupByString, final LockOptions lockOptions) throws MappingException { walkEntityTree( persister, getAlias() ); persisters = new Loadable[0]; initStatementString(projectionString, whereString, orderByString, groupByString, lockOptions); }
protected final void initAll( final String whereString, final String orderByString, final LockOptions lockOptions, final AssociationInitCallback callback) throws MappingException { walkEntityTree( persister, getAlias() ); List allAssociations = new ArrayList(); allAssociations.addAll( associations ); allAssociations.add( OuterJoinableAssociation.createRoot( persister.getEntityType(), alias, getFactory() ) ); initPersisters( allAssociations, lockOptions, callback ); initStatementString( whereString, orderByString, lockOptions ); }
protected final void initAll( final String whereString, final String orderByString, final LockOptions lockOptions, final AssociationInitCallback callback) throws MappingException { walkEntityTree( persister, getAlias() ); List allAssociations = new ArrayList(); allAssociations.addAll( associations ); allAssociations.add( OuterJoinableAssociation.createRoot( persister.getEntityType(), alias, getFactory() ) ); initPersisters( allAssociations, lockOptions, callback ); initStatementString( whereString, orderByString, lockOptions ); }
protected final void initAll( final String whereString, final String orderByString, final LockMode lockMode) throws MappingException { walkEntityTree( persister, getAlias() ); List allAssociations = new ArrayList(); allAssociations.addAll(associations); allAssociations.add( new OuterJoinableAssociation( persister.getEntityType(), null, null, alias, JoinFragment.LEFT_OUTER_JOIN, getFactory(), CollectionHelper.EMPTY_MAP ) ); initPersisters(allAssociations, lockMode); initStatementString( whereString, orderByString, lockMode); }
private void initStatementString( final String projection, final String condition, final String orderBy, final String groupBy, final LockMode lockMode) throws MappingException { final int joins = countEntityPersisters( associations ); suffixes = BasicLoader.generateSuffixes( joins+1 ); JoinFragment ojf = mergeOuterJoins( associations ); Select select = new Select( getDialect() ) .setLockMode(lockMode) .setSelectClause( projection==null ? persister.selectFragment( alias, suffixes[joins] ) + selectString(associations) : projection ) .setFromClause( persister.fromTableFragment(alias) + persister.fromJoinFragment(alias, true, true) ) .setWhereClause(condition) .setOuterJoins( ojf.toFromFragmentString(), ojf.toWhereFragmentString() + getWhereFragment() ) .setOrderByClause( orderBy( associations, orderBy ) )
private void initStatementString( final String projection, final String condition, final String orderBy, final String groupBy, final LockOptions lockOptions) throws MappingException { final int joins = countEntityPersisters( associations ); suffixes = BasicLoader.generateSuffixes( joins + 1 ); JoinFragment ojf = mergeOuterJoins( associations ); Select select = new Select( getDialect() ) .setLockOptions( lockOptions ) .setSelectClause( projection == null ? persister.selectFragment( alias, suffixes[joins] ) + selectString( associations ) : projection ) .setFromClause( getDialect().appendLockHint( lockOptions.getLockMode(), persister.fromTableFragment( alias ) ) + persister.fromJoinFragment( alias, true, true ) ) .setWhereClause( condition ) .setOuterJoins( ojf.toFromFragmentString(), ojf.toWhereFragmentString() + getWhereFragment() ) .setOrderByClause( orderBy( associations, orderBy ) ) .setGroupByClause( groupBy );
private void initStatementString( final String projection, final String condition, final String orderBy, final String groupBy, final LockOptions lockOptions) throws MappingException { final int joins = countEntityPersisters( associations ); suffixes = BasicLoader.generateSuffixes( joins + 1 ); JoinFragment ojf = mergeOuterJoins( associations ); Select select = new Select( getDialect() ) .setLockOptions( lockOptions ) .setSelectClause( projection == null ? persister.selectFragment( alias, suffixes[joins] ) + selectString( associations ) : projection ) .setFromClause( getDialect().appendLockHint( lockOptions.getLockMode(), persister.fromTableFragment( alias ) ) + persister.fromJoinFragment( alias, true, true ) ) .setWhereClause( condition ) .setOuterJoins( ojf.toFromFragmentString(), ojf.toWhereFragmentString() + getWhereFragment() ) .setOrderByClause( orderBy( associations, orderBy ) ) .setGroupByClause( groupBy );