org.apache.cayenne.access.trans
Class LOBBatchQueryWrapper

java.lang.Object
  extended by org.apache.cayenne.access.trans.LOBBatchQueryWrapper

public class LOBBatchQueryWrapper
extends java.lang.Object

Helper class to extract the information from BatchQueries, essential for LOB columns processing.

Author:
Andrei Adamchik

Field Summary
protected  boolean[] allLOBAttributes
           
protected  java.util.List dbAttributes
           
protected  boolean hasNext
           
protected  boolean[] qualifierAttributes
           
protected  BatchQuery query
           
protected  java.lang.Object[] updatedLOBAttributes
           
 
Constructor Summary
LOBBatchQueryWrapper(BatchQuery query)
           
 
Method Summary
protected  byte[] convertToBlobValue(java.lang.Object value)
          Converts value to byte[] if possible.
protected  java.lang.Object convertToClobValue(java.lang.Object value)
          Converts to char[] or String.
 java.util.List getDbAttributesForLOBSelectQualifier()
          Returns a list of DbAttributes used in the qualifier of the query that selects a LOB row for LOB update.
 java.util.List getDbAttributesForUpdatedLOBColumns()
          Returns a list of DbAttributes that correspond to the LOB columns updated in the current row in the batch query.
 BatchQuery getQuery()
          Returns wrapped BatchQuery.
 java.util.List getValuesForLOBSelectQualifier()
           
 java.util.List getValuesForUpdatedLOBColumns()
           
protected  void indexLOBAttributes()
          Indexes attributes
protected  void indexQualifierAttributes()
          Indexes attributes
 boolean next()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

query

protected BatchQuery query

dbAttributes

protected java.util.List dbAttributes

qualifierAttributes

protected boolean[] qualifierAttributes

allLOBAttributes

protected boolean[] allLOBAttributes

updatedLOBAttributes

protected java.lang.Object[] updatedLOBAttributes

hasNext

protected boolean hasNext
Constructor Detail

LOBBatchQueryWrapper

public LOBBatchQueryWrapper(BatchQuery query)
Method Detail

next

public boolean next()

indexQualifierAttributes

protected void indexQualifierAttributes()
Indexes attributes


indexLOBAttributes

protected void indexLOBAttributes()
Indexes attributes


convertToBlobValue

protected byte[] convertToBlobValue(java.lang.Object value)
Converts value to byte[] if possible.


convertToClobValue

protected java.lang.Object convertToClobValue(java.lang.Object value)
Converts to char[] or String. Both are acceptable when writing CLOBs.


getDbAttributesForLOBSelectQualifier

public java.util.List getDbAttributesForLOBSelectQualifier()
Returns a list of DbAttributes used in the qualifier of the query that selects a LOB row for LOB update.


getDbAttributesForUpdatedLOBColumns

public java.util.List getDbAttributesForUpdatedLOBColumns()
Returns a list of DbAttributes that correspond to the LOB columns updated in the current row in the batch query. The list will not include LOB attributes that are null or empty.


getValuesForLOBSelectQualifier

public java.util.List getValuesForLOBSelectQualifier()

getValuesForUpdatedLOBColumns

public java.util.List getValuesForUpdatedLOBColumns()

getQuery

public BatchQuery getQuery()
Returns wrapped BatchQuery.



Copyright © 2001-2006 Apache.org All Rights Reserved.