jodd.db.orm.sqlgen.chunks
Class MatchChunk

java.lang.Object
  extended by jodd.db.orm.sqlgen.chunks.SqlChunk
      extended by jodd.db.orm.sqlgen.chunks.MatchChunk
All Implemented Interfaces:
java.lang.Cloneable

public class MatchChunk
extends SqlChunk

Renders condition part of the sql query based on values in provided entity object. Conditions are defined by following expression: tableRef = objectRef. Matching may be done for existing columns (non-null), all columns (including nulls) and just for the identity columns.


Field Summary
protected  java.lang.Object data
           
protected  int includeColumns
           
protected  java.lang.String objectRef
           
protected  java.lang.String tableRef
           
 
Fields inherited from class jodd.db.orm.sqlgen.chunks.SqlChunk
CHUNK_INSERT, CHUNK_MATCH, CHUNK_RAW, CHUNK_REFERENCE, CHUNK_SELECT_COLUMNS, CHUNK_TABLE, CHUNK_UPDATE, CHUNK_VALUE, chunkType, COLS_ALL, COLS_NA, COLS_ONLY_EXISTING, COLS_ONLY_IDS, nextChunk, previousChunk, templateData
 
Constructor Summary
  MatchChunk(java.lang.String expression)
           
  MatchChunk(java.lang.String tableRef, java.lang.Object data, int includeColumns)
           
  MatchChunk(java.lang.String tableRef, java.lang.String objectRef, int includeColumns)
           
protected MatchChunk(java.lang.String tableRef, java.lang.String objectRef, java.lang.Object data, int includeColumns)
           
 
Method Summary
 SqlChunk clone()
          Clones all parsed chunk data to an instance that is ready for processing.
 void process(java.lang.StringBuilder out)
          Process the chunk and appends data to the output.
 
Methods inherited from class jodd.db.orm.sqlgen.chunks.SqlChunk
appendMissingSpace, defineParameter, getNextChunk, getPreviousChunk, init, insertChunkAfter, isPreviousChunkOfSameType, isPreviousChunkOfType, isPreviousMacroChunk, isPreviousRawChunk, lookupName, lookupTableRef, lookupType, resolveClass, resolveTable, separateByCommaOrSpace
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected java.lang.Object data

tableRef

protected final java.lang.String tableRef

objectRef

protected final java.lang.String objectRef

includeColumns

protected final int includeColumns
Constructor Detail

MatchChunk

public MatchChunk(java.lang.String tableRef,
                  java.lang.Object data,
                  int includeColumns)

MatchChunk

public MatchChunk(java.lang.String tableRef,
                  java.lang.String objectRef,
                  int includeColumns)

MatchChunk

protected MatchChunk(java.lang.String tableRef,
                     java.lang.String objectRef,
                     java.lang.Object data,
                     int includeColumns)

MatchChunk

public MatchChunk(java.lang.String expression)
Method Detail

process

public void process(java.lang.StringBuilder out)
Description copied from class: SqlChunk
Process the chunk and appends data to the output.

Specified by:
process in class SqlChunk

clone

public SqlChunk clone()
Description copied from class: SqlChunk
Clones all parsed chunk data to an instance that is ready for processing.

Specified by:
clone in class SqlChunk


Copyright © 2003-2010 Jodd Team