|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.engine.DbObjectBase
org.h2.schema.SchemaObjectBase
org.h2.engine.FunctionAlias
public class FunctionAlias
Represents a user-defined function, or alias.
Nested Class Summary | |
---|---|
static class |
FunctionAlias.JavaMethod
There may be multiple Java methods that match a function name. |
Field Summary |
---|
Fields inherited from class org.h2.engine.DbObjectBase |
---|
comment, database, trace |
Fields inherited from interface org.h2.engine.DbObject |
---|
AGGREGATE, COMMENT, CONSTANT, CONSTRAINT, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, TABLE_OR_VIEW, TRIGGER, USER, USER_DATATYPE |
Method Summary | |
---|---|
void |
checkRename()
Check if this object can be renamed. |
FunctionAlias.JavaMethod |
findJavaMethod(Expression[] args)
Find the Java method that matches the arguments. |
java.lang.String |
getCreateSQL()
Build a SQL statement to re-create this object. |
java.lang.String |
getCreateSQLForCopy(Table table,
java.lang.String quotedName)
Build a SQL statement to re-create the object, or to create a copy of the object with a different name or referencing a different table |
java.lang.String |
getDropSQL()
Build a SQL statement to drop this object. |
java.lang.String |
getJavaClassName()
|
java.lang.String |
getJavaMethodName()
|
FunctionAlias.JavaMethod[] |
getJavaMethods()
Get the Java methods mapped by this function. |
java.lang.String |
getSource()
|
java.lang.String |
getSQL()
Get the SQL name of this object (may be quoted). |
int |
getType()
Get the object type. |
boolean |
isDeterministic()
|
static FunctionAlias |
newInstance(Schema schema,
int id,
java.lang.String name,
java.lang.String javaClassMethod,
boolean force)
Create a new alias based on a method name. |
static FunctionAlias |
newInstanceFromSource(Schema schema,
int id,
java.lang.String name,
java.lang.String source,
boolean force)
Create a new alias based on source code. |
void |
removeChildrenAndResources(Session session)
Remove all dependent objects and free all resources (files, blocks in files) of this object. |
void |
setDeterministic(boolean deterministic)
|
Methods inherited from class org.h2.schema.SchemaObjectBase |
---|
getSchema, initSchemaObjectBase, isHidden |
Methods inherited from class org.h2.engine.DbObjectBase |
---|
getChildren, getComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, rename, setComment, setModified, setObjectName, setTemporary, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.h2.engine.DbObject |
---|
getChildren, getComment, getDatabase, getId, getModificationId, getName, isTemporary, rename, setComment, setModified, setTemporary |
Method Detail |
---|
public static FunctionAlias newInstance(Schema schema, int id, java.lang.String name, java.lang.String javaClassMethod, boolean force)
schema
- the schemaid
- the idname
- the namejavaClassMethod
- the class and method nameforce
- create the object even if the class or method does not exist
public static FunctionAlias newInstanceFromSource(Schema schema, int id, java.lang.String name, java.lang.String source, boolean force)
schema
- the schemaid
- the idname
- the namesource
- the source codeforce
- create the object even if the class or method does not exist
public java.lang.String getCreateSQLForCopy(Table table, java.lang.String quotedName)
DbObjectBase
getCreateSQLForCopy
in interface DbObject
getCreateSQLForCopy
in class DbObjectBase
table
- the new table namequotedName
- the new quoted name
public java.lang.String getDropSQL()
DbObjectBase
getDropSQL
in interface DbObject
getDropSQL
in class DbObjectBase
public java.lang.String getSQL()
DbObject
getSQL
in interface DbObject
getSQL
in class SchemaObjectBase
public java.lang.String getCreateSQL()
DbObjectBase
getCreateSQL
in interface DbObject
getCreateSQL
in class DbObjectBase
public int getType()
DbObjectBase
getType
in interface DbObject
getType
in class DbObjectBase
public void removeChildrenAndResources(Session session)
DbObjectBase
removeChildrenAndResources
in interface DbObject
removeChildrenAndResources
in class DbObjectBase
session
- the sessionpublic void checkRename()
DbObjectBase
checkRename
in interface DbObject
checkRename
in class DbObjectBase
public FunctionAlias.JavaMethod findJavaMethod(Expression[] args)
args
- the argument list
SQLException
- if no matching method could be foundpublic java.lang.String getJavaClassName()
public java.lang.String getJavaMethodName()
public FunctionAlias.JavaMethod[] getJavaMethods()
public void setDeterministic(boolean deterministic)
public boolean isDeterministic()
public java.lang.String getSource()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |