sf logo

sf.qof.parser
Class ResultDefinitionImpl

java.lang.Object
  extended by sf.qof.parser.ResultDefinitionImpl
All Implemented Interfaces:
Definition, ResultDefinition

public class ResultDefinitionImpl
extends Object
implements ResultDefinition

Default implementation of a result definition.


Constructor Summary
ResultDefinitionImpl()
           
 
Method Summary
 String[] getColumns()
          Returns an array of SQL column names.
 int getConstructorParameter()
          Returns the index of a parameter in a constructor.
 String getField()
          Returns the name a field if the result is a Java bean.
 int[] getIndexes()
          Returns an array of SQL column indexes.
 String getPartialDefinitionGroup()
          Returns group name of the partial definition or null.
 int getPartialDefinitionPart()
          Returns the part number of the partial definition.
 String getType()
          Returns the type of the parameter (string, int, etc.).
 boolean isMapKey()
          Returns true if the result definition is for the key if the result is a map.
 boolean isPartialDefinition()
          Returns true is the definition is a partial definition that needs to be combined.
 void setColumns(String[] columns)
           
 void setConstructorParameter(int parameter)
           
 void setField(String field)
           
 void setIndexes(int[] indexes)
           
 void setIsMapKey(boolean isMapKey)
           
 void setPartialDefinitionGroup(String partialDefinitionGroup)
           
 void setPartialDefinitionPart(int partialDefinitionPart)
           
 void setType(String type)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResultDefinitionImpl

public ResultDefinitionImpl()
Method Detail

getColumns

public String[] getColumns()
Description copied from interface: ResultDefinition
Returns an array of SQL column names. Can be empty.

Specified by:
getColumns in interface ResultDefinition
Returns:
array of SQL column names

getField

public String getField()
Description copied from interface: ResultDefinition
Returns the name a field if the result is a Java bean.

Specified by:
getField in interface ResultDefinition
Returns:
name of a field in a Java bean result.

getConstructorParameter

public int getConstructorParameter()
Description copied from interface: ResultDefinition
Returns the index of a parameter in a constructor.

Specified by:
getConstructorParameter in interface ResultDefinition
Returns:
parameter index in the constructor

getIndexes

public int[] getIndexes()
Description copied from interface: ResultDefinition
Returns an array of SQL column indexes. Can be empty.

Specified by:
getIndexes in interface ResultDefinition
Returns:
array of SQL column indexes

getType

public String getType()
Description copied from interface: Definition
Returns the type of the parameter (string, int, etc.).

Specified by:
getType in interface Definition
Returns:
type of the parameter

setColumns

public void setColumns(String[] columns)

setField

public void setField(String field)

setConstructorParameter

public void setConstructorParameter(int parameter)

setIndexes

public void setIndexes(int[] indexes)

setType

public void setType(String type)

setIsMapKey

public void setIsMapKey(boolean isMapKey)

toString

public String toString()
Overrides:
toString in class Object

isMapKey

public boolean isMapKey()
Description copied from interface: ResultDefinition
Returns true if the result definition is for the key if the result is a map.

Specified by:
isMapKey in interface ResultDefinition
Returns:
map key

getPartialDefinitionGroup

public String getPartialDefinitionGroup()
Description copied from interface: Definition
Returns group name of the partial definition or null.

Specified by:
getPartialDefinitionGroup in interface Definition
Returns:
group name of partial definition or null

setPartialDefinitionGroup

public void setPartialDefinitionGroup(String partialDefinitionGroup)

getPartialDefinitionPart

public int getPartialDefinitionPart()
Description copied from interface: Definition
Returns the part number of the partial definition.

Specified by:
getPartialDefinitionPart in interface Definition
Returns:
part number of the partial definition or 0

setPartialDefinitionPart

public void setPartialDefinitionPart(int partialDefinitionPart)

isPartialDefinition

public boolean isPartialDefinition()
Description copied from interface: Definition
Returns true is the definition is a partial definition that needs to be combined.

Specified by:
isPartialDefinition in interface Definition
Returns:
true if definition is partial

sf logo

Copyright © 2007 brunella ltd. All Rights Reserved.