persistence.visitor
Class DeleteVisitor

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

public class DeleteVisitor
extends java.lang.Object
implements TableComponentVisitor

Creëren van advice-code voor verwijderen van @persistent-objecten uit databank.

Author:
bram 1-nov-2003

Field Summary
private  java.lang.String connectionExpression
           
private  java.lang.String currentAlias
           
private  java.lang.String currentAttribute
           
private  net.sf.hibernate.sql.Delete currentDelete
           
private  java.lang.String currentOID
           
private  java.util.ArrayList deleteStrings
           
private  java.lang.String fullClassName
           
private  boolean iterationNeeded
           
private  java.lang.String iteratorName
           
private  java.lang.String JDBCPreparedStatementName
           
private  java.lang.String JDBCStatementName
           
private  java.lang.String keyAlias
           
private  java.util.ArrayList keyNames
           
private  java.util.ArrayList keyValues
           
private  int nameDiscriminator
           
private  java.lang.String nameOfPersistentObject
           
private  java.lang.String nextAlias
           
private  java.util.ArrayList resultStrings
           
private  java.util.ArrayList stack
           
private  java.lang.String subTreeSQL
           
private  int tokenIndex
           
 
Constructor Summary
DeleteVisitor(java.lang.String fullClassName, java.lang.String connectionExpression)
           
 
Method Summary
(package private)  java.lang.String getAllLines(java.lang.String jdbcStatementName)
           
 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

nameDiscriminator

private int nameDiscriminator

tokenIndex

private int tokenIndex

fullClassName

private java.lang.String fullClassName

stack

private java.util.ArrayList stack

resultStrings

private java.util.ArrayList resultStrings

currentDelete

private net.sf.hibernate.sql.Delete currentDelete

currentAttribute

private java.lang.String currentAttribute

currentOID

private java.lang.String currentOID

currentAlias

private java.lang.String currentAlias

nextAlias

private java.lang.String nextAlias

keyAlias

private java.lang.String keyAlias

keyNames

private java.util.ArrayList keyNames

keyValues

private java.util.ArrayList keyValues

deleteStrings

private java.util.ArrayList deleteStrings

iterationNeeded

private boolean iterationNeeded

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

nameOfPersistentObject

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

connectionExpression

private java.lang.String connectionExpression
Constructor Detail

DeleteVisitor

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

visitAttribute

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

visitReferenceAttribute

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

visitTable

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

visitArrayTable

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

visitCollectionTable

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

visitMapTable

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

getResult

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

getAllLines

java.lang.String getAllLines(java.lang.String jdbcStatementName)