net.ontopia.persistence.query.sql
Class SQLFunction

java.lang.Object
  extended by net.ontopia.persistence.query.sql.SQLFunction
All Implemented Interfaces:
SQLValueIF

public class SQLFunction
extends java.lang.Object
implements SQLValueIF

INTERNAL: SQL condition: any function; fn(arg1, ... argN)


Field Summary
protected  java.lang.String alias
           
protected  SQLValueIF[] args
           
protected static FieldHandlerIF DEFAULT_FIELD_HANDLER
           
protected static java.lang.Class DEFAULT_VALUE_TYPE
           
protected  FieldHandlerIF fhandler
           
protected  java.lang.String name
           
protected  java.lang.Class vtype
           
 
Fields inherited from interface net.ontopia.persistence.query.sql.SQLValueIF
COLUMNS, FUNCTION, NULL, PARAMETER, PRIMITIVE, TUPLE, VERBATIM
 
Constructor Summary
SQLFunction(java.lang.String name, SQLValueIF[] args)
           
 
Method Summary
 java.lang.String getAlias()
          INTERNAL: The column alias to use if this value is included in the projection.
 SQLValueIF[] getArguments()
           
 int getArity()
          INTERNAL: Returns the [column] arity of the value.
 FieldHandlerIF getFieldHandler()
          INTERNAL: Returns the field handler for the columns.
 java.lang.String getName()
           
 SQLValueIF getReference()
          INTERNAL: Returns the referenced value if one exists.
 int getType()
          INTERNAL: Returns the value class type.
 int getValueArity()
          INTERNAL: Returns the value arity of the value.
 java.lang.Class getValueType()
          INTERNAL: Returns the value type.
 boolean isReference()
          INTERNAL: Returns true if this value is a reference to another.
 void setAlias(java.lang.String alias)
          INTERNAL: Sets the column alias.
 void setArguments(SQLValueIF[] args)
           
 void setFieldHandler(FieldHandlerIF fhandler)
          INTERNAL: Sets the field handler for the value.
 void setValueType(java.lang.Class vtype)
          INTERNAL: Sets the value type.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_VALUE_TYPE

protected static final java.lang.Class DEFAULT_VALUE_TYPE

DEFAULT_FIELD_HANDLER

protected static final FieldHandlerIF DEFAULT_FIELD_HANDLER

name

protected java.lang.String name

args

protected SQLValueIF[] args

alias

protected java.lang.String alias

vtype

protected java.lang.Class vtype

fhandler

protected FieldHandlerIF fhandler
Constructor Detail

SQLFunction

public SQLFunction(java.lang.String name,
                   SQLValueIF[] args)
Method Detail

getType

public int getType()
Description copied from interface: SQLValueIF
INTERNAL: Returns the value class type. The type is represented by one of the constants in the SQLValueIF interface.

Specified by:
getType in interface SQLValueIF

getName

public java.lang.String getName()

getArguments

public SQLValueIF[] getArguments()

setArguments

public void setArguments(SQLValueIF[] args)

getArity

public int getArity()
Description copied from interface: SQLValueIF
INTERNAL: Returns the [column] arity of the value. The number represents the number of "columns" the value spans, i.e. its composite width.

Specified by:
getArity in interface SQLValueIF

getValueArity

public int getValueArity()
Description copied from interface: SQLValueIF
INTERNAL: 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:
getValueArity in interface SQLValueIF

getAlias

public java.lang.String getAlias()
Description copied from interface: SQLValueIF
INTERNAL: The column alias to use if this value is included in the projection. The SQL select syntax is typically like "select value as from foo".

Specified by:
getAlias in interface SQLValueIF

setAlias

public void setAlias(java.lang.String alias)
Description copied from interface: SQLValueIF
INTERNAL: Sets the column alias.

Specified by:
setAlias in interface SQLValueIF

isReference

public boolean isReference()
Description copied from interface: SQLValueIF
INTERNAL: Returns true if this value is a reference to another.

Specified by:
isReference in interface SQLValueIF

getReference

public SQLValueIF getReference()
Description copied from interface: SQLValueIF
INTERNAL: Returns the referenced value if one exists.

Specified by:
getReference in interface SQLValueIF

getValueType

public java.lang.Class getValueType()
Description copied from interface: SQLValueIF
INTERNAL: Returns the value type.

Specified by:
getValueType in interface SQLValueIF

setValueType

public void setValueType(java.lang.Class vtype)
Description copied from interface: SQLValueIF
INTERNAL: Sets the value type.

Specified by:
setValueType in interface SQLValueIF

getFieldHandler

public FieldHandlerIF getFieldHandler()
Description copied from interface: SQLValueIF
INTERNAL: Returns the field handler for the columns.

Specified by:
getFieldHandler in interface SQLValueIF

setFieldHandler

public void setFieldHandler(FieldHandlerIF fhandler)
Description copied from interface: SQLValueIF
INTERNAL: Sets the field handler for the value.

Specified by:
setFieldHandler in interface SQLValueIF

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2000-2012 Ontopia.