Class SQLPrimitive
java.lang.Object
net.ontopia.persistence.query.sql.SQLPrimitive
- All Implemented Interfaces:
SQLValueIF
INTERNAL: SQL value: primitive. Represents a primitive value of one
of the standard SQL types. A primitive always has an arity of 1.
Warning: Null should be represented using the SQLNull class.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected FieldHandlerIFprotected intprotected Objectprotected Class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAlias()INTERNAL: The column alias to use if this value is included in the projection.intgetArity()INTERNAL: Returns the [column] arity of the value.INTERNAL: Returns the field handler for the columns.INTERNAL: Returns the referenced value if one exists.intintgetType()INTERNAL: Returns the value class type.getValue()intINTERNAL: Returns the value arity of the value.INTERNAL: Returns the value type.booleanINTERNAL: Returns true if this value is a reference to another.voidINTERNAL: Sets the column alias.voidsetFieldHandler(FieldHandlerIF fhandler) INTERNAL: Sets the field handler for the value.voidsetValueType(Class vtype) INTERNAL: Sets the value type.toString()
-
Field Details
-
value
-
sql_type
protected int sql_type -
alias
-
vtype
-
fhandler
-
-
Constructor Details
-
SQLPrimitive
-
-
Method Details
-
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
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
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
Description copied from interface:SQLValueIFINTERNAL: Returns the referenced value if one exists.- Specified by:
getReferencein interfaceSQLValueIF
-
getSQLType
public int getSQLType() -
getValue
-
getValueType
Description copied from interface:SQLValueIFINTERNAL: Returns the value type.- Specified by:
getValueTypein interfaceSQLValueIF
-
setValueType
Description copied from interface:SQLValueIFINTERNAL: Sets the value type.- Specified by:
setValueTypein interfaceSQLValueIF
-
getFieldHandler
Description copied from interface:SQLValueIFINTERNAL: Returns the field handler for the columns.- Specified by:
getFieldHandlerin interfaceSQLValueIF
-
setFieldHandler
Description copied from interface:SQLValueIFINTERNAL: Sets the field handler for the value.- Specified by:
setFieldHandlerin interfaceSQLValueIF
-
toString
-