persistence.visitor
Class ReadVisitor

java.lang.Object
  extended bypersistence.visitor.ReadVisitor
All Implemented Interfaces:
TableComponentVisitor

public class ReadVisitor
extends java.lang.Object
implements TableComponentVisitor

Creatie van read-advice van implementor-aspecten.

Author:
bram 21-feb-2004

Field Summary
private  java.lang.String connectionExpression
           
private  java.lang.String currentAlias
           
private  java.lang.String currentAttribute
           
private  java.lang.String currentResultSetName
           
private  net.sf.hibernate.sql.Select currentSelect
           
private  java.lang.String fullClassName
           
private  java.lang.String iteratorName
           
private  java.lang.String JDBCPreparedStatementName
           
private  java.lang.String JDBCResultSetName
           
private  java.lang.String JDBCStatementName
           
private  java.lang.String keyAlias
           
private  java.util.Map keyMap
           
private  int nameDiscriminator
           
private  java.lang.String nameOfDeep
           
private  java.lang.String nameOfObject
           
private  java.lang.String nameOfOID
           
private  java.lang.String nextAlias
           
private  java.util.ArrayList resultStrings
           
private  java.util.ArrayList stack
           
private  java.lang.String subTreeSQL
           
 
Constructor Summary
ReadVisitor(java.lang.String fullClassName, java.lang.String connectionExpression)
           
 
Method Summary
private  java.lang.String createWhereClause()
          Create where-clause with all the $ref...
 java.lang.String getResult()
           
 void visitArrayTable(ArrayTable ar)
           
 void visitAttribute(Attribute attr)
           
 void visitCollectionTable(CollectionTable coll)
           
 void visitMapTable(MapTable map)
           
 void visitReferenceAttribute(ReferenceAttribute refAttr)
           
 void visitTable(Table table)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fullClassName

private java.lang.String fullClassName

nameDiscriminator

private int nameDiscriminator

stack

private java.util.ArrayList stack

resultStrings

private java.util.ArrayList resultStrings

currentSelect

private net.sf.hibernate.sql.Select currentSelect

currentAttribute

private java.lang.String currentAttribute

currentAlias

private java.lang.String currentAlias

keyAlias

private java.lang.String keyAlias

nextAlias

private java.lang.String nextAlias

currentResultSetName

private java.lang.String currentResultSetName

keyMap

private java.util.Map keyMap

subTreeSQL

private java.lang.String subTreeSQL

JDBCStatementName

private final java.lang.String JDBCStatementName
See Also:
Constant Field Values

JDBCPreparedStatementName

private final java.lang.String JDBCPreparedStatementName
See Also:
Constant Field Values

iteratorName

private final java.lang.String iteratorName
See Also:
Constant Field Values

JDBCResultSetName

private final java.lang.String JDBCResultSetName
See Also:
Constant Field Values

nameOfObject

private final java.lang.String nameOfObject
See Also:
Constant Field Values

nameOfDeep

private final java.lang.String nameOfDeep
See Also:
Constant Field Values

nameOfOID

private final java.lang.String nameOfOID
See Also:
Constant Field Values

connectionExpression

private java.lang.String connectionExpression
Constructor Detail

ReadVisitor

public ReadVisitor(java.lang.String fullClassName,
                   java.lang.String connectionExpression)
Method Detail

visitAttribute

public void visitAttribute(Attribute attr)
Specified by:
visitAttribute in interface TableComponentVisitor
See Also:
TableComponentVisitor.visitAttribute(persistence.table.Attribute)

visitReferenceAttribute

public void visitReferenceAttribute(ReferenceAttribute refAttr)
Specified by:
visitReferenceAttribute in interface TableComponentVisitor
See Also:
TableComponentVisitor.visitReferenceAttribute(persistence.table.ReferenceAttribute)

visitTable

public void visitTable(Table table)
Specified by:
visitTable in interface TableComponentVisitor
See Also:
TableComponentVisitor.visitTable(persistence.table.Table)

visitArrayTable

public void visitArrayTable(ArrayTable ar)
Specified by:
visitArrayTable in interface TableComponentVisitor
See Also:
TableComponentVisitor.visitArrayTable(persistence.table.ArrayTable)

visitCollectionTable

public void visitCollectionTable(CollectionTable coll)
Specified by:
visitCollectionTable in interface TableComponentVisitor
See Also:
TableComponentVisitor.visitCollectionTable(persistence.table.CollectionTable)

visitMapTable

public void visitMapTable(MapTable map)
Specified by:
visitMapTable in interface TableComponentVisitor
See Also:
TableComponentVisitor.visitMapTable(persistence.table.MapTable)

getResult

public java.lang.String getResult()
Specified by:
getResult in interface TableComponentVisitor
See Also:
TableComponentVisitor.getResult()

createWhereClause

private java.lang.String createWhereClause()
Create where-clause with all the $ref...$-fields.

Returns: