Class SQLTuple
- java.lang.Object
-
- net.ontopia.persistence.query.sql.SQLTuple
-
- All Implemented Interfaces:
SQLValueIF
public class SQLTuple extends Object implements SQLValueIF
INTERNAL: SQL value: tuple. Represents a list of nested SQL values. The arity is the same as the total arity of its nested values.
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringaliasprotected intarityprotected FieldHandlerIFfhandlerprotected intvalue_arityprotected SQLValueIF[]valuesprotected Classvtype
-
Constructor Summary
Constructors Constructor Description SQLTuple(List<SQLValueIF> values)SQLTuple(SQLValueIF[] values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetAlias()INTERNAL: The column alias to use if this value is included in the projection.intgetArity()INTERNAL: Returns the [column] arity of the value.FieldHandlerIFgetFieldHandler()INTERNAL: Returns the field handler for the columns.SQLValueIFgetReference()INTERNAL: Returns the referenced value if one exists.intgetType()INTERNAL: Returns the value class type.intgetValueArity()INTERNAL: Returns the value arity of the value.SQLValueIF[]getValues()ClassgetValueType()INTERNAL: Returns the value type.booleanisReference()INTERNAL: Returns true if this value is a reference to another.voidsetAlias(String alias)INTERNAL: Sets the column alias.voidsetFieldHandler(FieldHandlerIF fhandler)INTERNAL: Sets the field handler for the value.voidsetValues(SQLValueIF[] values)voidsetValueType(Class vtype)INTERNAL: Sets the value type.StringtoString()
-
-
-
Field Detail
-
values
protected SQLValueIF[] values
-
arity
protected int arity
-
value_arity
protected int value_arity
-
alias
protected String alias
-
vtype
protected Class vtype
-
fhandler
protected FieldHandlerIF fhandler
-
-
Constructor Detail
-
SQLTuple
public SQLTuple(List<SQLValueIF> values)
-
SQLTuple
public SQLTuple(SQLValueIF[] values)
-
-
Method Detail
-
getType
public int getType()
Description copied from interface:SQLValueIFINTERNAL: Returns the value class type. The type is represented by one of the constants in theSQLValueIFinterface.- Specified by:
getTypein interfaceSQLValueIF
-
getArity
public int getArity()
Description copied from interface:SQLValueIFINTERNAL: Returns the [column] arity of the value. The number represents the number of "columns" the value spans, i.e. its composite width.- Specified by:
getArityin interfaceSQLValueIF
-
getValueArity
public int getValueArity()
Description copied from interface:SQLValueIFINTERNAL: Returns the value arity of the value. This number refers to the number of nested values this value contains including itself. Most values therefore have a value arity of 1. Nested values may have an arity higher than 1. SQLTuple is currently the only nested value type.- Specified by:
getValueArityin interfaceSQLValueIF
-
getAlias
public String getAlias()
Description copied from interface:SQLValueIFINTERNAL: The column alias to use if this value is included in the projection. The SQL select syntax is typically like "select value asfrom foo". - Specified by:
getAliasin interfaceSQLValueIF
-
setAlias
public void setAlias(String alias)
Description copied from interface:SQLValueIFINTERNAL: Sets the column alias.- Specified by:
setAliasin interfaceSQLValueIF
-
isReference
public boolean isReference()
Description copied from interface:SQLValueIFINTERNAL: Returns true if this value is a reference to another.- Specified by:
isReferencein interfaceSQLValueIF
-
getReference
public SQLValueIF getReference()
Description copied from interface:SQLValueIFINTERNAL: Returns the referenced value if one exists.- Specified by:
getReferencein interfaceSQLValueIF
-
getValues
public SQLValueIF[] getValues()
-
setValues
public void setValues(SQLValueIF[] values)
-
getValueType
public Class getValueType()
Description copied from interface:SQLValueIFINTERNAL: Returns the value type.- Specified by:
getValueTypein interfaceSQLValueIF
-
setValueType
public void setValueType(Class vtype)
Description copied from interface:SQLValueIFINTERNAL: Sets the value type.- Specified by:
setValueTypein interfaceSQLValueIF
-
getFieldHandler
public FieldHandlerIF getFieldHandler()
Description copied from interface:SQLValueIFINTERNAL: Returns the field handler for the columns.- Specified by:
getFieldHandlerin interfaceSQLValueIF
-
setFieldHandler
public void setFieldHandler(FieldHandlerIF fhandler)
Description copied from interface:SQLValueIFINTERNAL: Sets the field handler for the value.- Specified by:
setFieldHandlerin interfaceSQLValueIF
-
-