public ComponentJoin( FromClause fromClause, FromElement origin, String alias, String componentPath, CompositeType componentType) { super( fromClause, origin, alias ); this.componentPath = componentPath; this.componentType = componentType; this.componentProperty = StringHelper.unqualify( componentPath ); fromClause.addJoinByPathMap( componentPath, this ); initializeComponentJoin( new ComponentFromElementType( this ) ); this.columns = origin.getPropertyMapping( "" ).toColumns( getTableAlias(), componentProperty ); StringBuilder buf = new StringBuilder(); for ( int j = 0; j < columns.length; j++ ) { final String column = columns[j]; if ( j > 0 ) { buf.append( ", " ); } buf.append( column ); } this.columnsFragment = buf.toString(); }
private FromElement initializeJoin( String path, FromElement destination, JoinSequence joinSequence, String[] columns, FromElement origin, boolean manyToMany) { destination.setType( JOIN_FRAGMENT ); destination.setJoinSequence( joinSequence ); destination.setColumns( columns ); destination.setOrigin( origin, manyToMany ); fromClause.addJoinByPathMap( path, destination ); return destination; }
public ComponentJoin( FromClause fromClause, FromElement origin, String alias, String componentPath, ComponentType componentType) { super( fromClause, origin, alias ); this.componentPath = componentPath; this.componentType = componentType; this.componentProperty = StringHelper.unqualify( componentPath ); fromClause.addJoinByPathMap( componentPath, this ); initializeComponentJoin( new ComponentFromElementType( this ) ); final String[] cols = origin.getPropertyMapping( "" ).toColumns( getTableAlias(), componentProperty ); StringBuffer buf = new StringBuffer(); for ( int j = 0; j < cols.length; j++ ) { final String column = cols[j]; if ( j > 0 ) { buf.append( ", " ); } buf.append( column ); } this.columns = buf.toString(); }
public ComponentJoin( FromClause fromClause, FromElement origin, String alias, String componentPath, ComponentType componentType) { super( fromClause, origin, alias ); this.componentPath = componentPath; this.componentType = componentType; this.componentProperty = StringHelper.unqualify( componentPath ); fromClause.addJoinByPathMap( componentPath, this ); initializeComponentJoin( new ComponentFromElementType( this ) ); final String[] cols = origin.getPropertyMapping( "" ).toColumns( getTableAlias(), componentProperty ); StringBuffer buf = new StringBuffer(); for ( int j = 0; j < cols.length; j++ ) { final String column = cols[j]; if ( j > 0 ) { buf.append( ", " ); } buf.append( column ); } this.columns = buf.toString(); }
private FromElement initializeJoin( String path, FromElement destination, JoinSequence joinSequence, String[] columns, FromElement origin, boolean manyToMany) { destination.setType( JOIN_FRAGMENT ); destination.setJoinSequence( joinSequence ); destination.setColumns( columns ); destination.setOrigin( origin, manyToMany ); fromClause.addJoinByPathMap( path, destination ); return destination; }
private FromElement initializeJoin( String path, FromElement destination, JoinSequence joinSequence, String[] columns, FromElement origin, boolean manyToMany) { destination.setType( JOIN_FRAGMENT ); destination.setJoinSequence( joinSequence ); destination.setColumns( columns ); destination.setOrigin( origin, manyToMany ); fromClause.addJoinByPathMap( path, destination ); return destination; }