|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lokahi.core.common.interfaces.RestObject org.apache.lokahi.core.common.interfaces.TMCDao<T> org.apache.lokahi.core.common.interfaces.XMLDao<Function> org.apache.lokahi.core.api.function.Function
public class Function
Represents the actions that a user can perform on configurable items that lokahi maintains and controls.
Constructor Summary | |
---|---|
Function()
Default constructor, public for the sake of reflection |
|
Function(int pk,
java.lang.String name,
java.lang.String command)
Full Constructor, mainly for use when creating objects from the datastore. |
|
Function(java.lang.String name,
java.lang.String command)
Prefered constructor for creation of new functions |
Method Summary | |
---|---|
java.lang.StringBuilder |
buildShortXMLRepresentation()
Builds a short xml representation of this object containing name, and primary key. |
java.lang.StringBuilder |
buildXMLRepresention()
Builds a xml representation of this object |
boolean |
equals(java.lang.Object o)
|
Function |
fillObject(org.jdom.Element el)
|
Function |
fillObject(java.sql.ResultSet r)
Creates the Dao from the passed resultset, internally calling the appriate constructor. |
Function |
get(int id)
Gets the function object by the primary key. |
java.lang.String |
getCommand()
|
static Function |
getFunction(int id)
Gets the function object by the primary key. |
static Function |
getFunction(java.lang.String command)
Gets the function object by the commad. |
static java.util.Collection<Function> |
getFunctions()
Gets all function objects. |
java.lang.String |
getName()
Gets the name. |
int |
getPk()
Gets the primary key |
int |
hashCode()
|
void |
setCommand(java.lang.String command)
Sets the command |
void |
setName(java.lang.String name)
Sets the name |
void |
setPk(int pk)
Sets the primary key |
java.lang.String |
toString()
|
Methods inherited from class org.apache.lokahi.core.common.interfaces.RestObject |
---|
elementBuilder, elementBuilder |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Function()
public Function(java.lang.String name, java.lang.String command)
name
- command
- public Function(int pk, java.lang.String name, java.lang.String command)
pk
- name
- command
- Method Detail |
---|
public int getPk()
Collectable
getPk
in interface Collectable
int
primary keypublic void setPk(int pk)
pk
- public java.lang.String getName()
Collectable
getName
in interface Collectable
String
name.public void setName(java.lang.String name)
name
- public java.lang.String getCommand()
public void setCommand(java.lang.String command)
command
- public Function get(int id)
get
in class TMCDao<Function>
id
- primary key of the Function to find.
public static Function getFunction(int id)
id
- primary key of the Function to find.
public static Function getFunction(java.lang.String command)
command
- command of the Function to find.
public static java.util.Collection<Function> getFunctions() throws java.sql.SQLException
java.sql.SQLException
public Function fillObject(java.sql.ResultSet r) throws java.sql.SQLException
Dao
fillObject
in interface Dao<Function>
r
- the resultset from a database call,
should include the entire object
java.sql.SQLException
public java.lang.StringBuilder buildShortXMLRepresentation()
Restable
buildShortXMLRepresentation
in interface Restable
public java.lang.StringBuilder buildXMLRepresention()
Restable
buildXMLRepresention
in interface Restable
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public Function fillObject(org.jdom.Element el)
fillObject
in class XMLDao<Function>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |