org.kuali.rice.krms.api.repository.function
Class FunctionDefinition

java.lang.Object
  extended by org.kuali.rice.krms.api.repository.function.FunctionDefinition
All Implemented Interfaces:
Serializable, Inactivatable, Identifiable, Versioned, ModelObjectBasic, ModelObjectComplete, FunctionDefinitionContract

public class FunctionDefinition
extends Object
implements FunctionDefinitionContract, ModelObjectComplete

An immutable representation of a function definition.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
FunctionDefinitionContract, Serialized Form

Nested Class Summary
static class FunctionDefinition.Builder
          A builder which can be used to construct FunctionDefinition instances.
(package private) static class FunctionDefinition.Constants
          Defines some internal constants used on this class.
(package private) static class FunctionDefinition.Elements
          A private class which exposes constants which define the XML element names to use when this object is marshalled to XML.
 
Field Summary
private  Collection<Element> _futureElements
           
private  boolean active
           
private  List<CategoryDefinition> categories
           
private  String description
           
private  String id
           
private  String name
           
private  String namespace
           
private  List<FunctionParameterDefinition> parameters
           
private  String returnType
           
private static long serialVersionUID
           
private  String typeId
           
private  Long versionNumber
           
 
Constructor Summary
private FunctionDefinition()
          Private constructor used only by JAXB.
private FunctionDefinition(FunctionDefinition.Builder builder)
           
 
Method Summary
 boolean equals(Object obj)
          All "Complete" model object's should adhere to the ModelObjectComplete.equals(Object) contract.
 List<CategoryDefinition> getCategories()
          Returns an ordered, immutable list of the categories which this function definition requires.
 String getDescription()
          Returns the description of this function definition.
 String getId()
          The unique identifier for an object.
 String getName()
          Returns the name of this function definition.
 String getNamespace()
          Returns the namespace code of this function definition.
 List<FunctionParameterDefinition> getParameters()
          Returns an ordered, immutable list of the parameters which this function definition requires.
 String getReturnType()
          Returns the type of the return value of the function defined by this function definition.
 String getTypeId()
          Returns the id of the KrmsTypeDefinition which defines the actual implementation of this function such that it can be loaded into the engine and executed.
 Long getVersionNumber()
          Returns the version number for this object.
 int hashCode()
          All "Complete" model object's should adhere to the ModelObjectComplete.hashCode() contract.
 boolean isActive()
          The active indicator for an object.
 String toString()
          This will return a proper string representation of the Model Object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

id

private final String id

namespace

private final String namespace

name

private final String name

description

private final String description

returnType

private final String returnType

typeId

private final String typeId

active

private final boolean active

versionNumber

private final Long versionNumber

parameters

private final List<FunctionParameterDefinition> parameters

categories

private final List<CategoryDefinition> categories

_futureElements

private final Collection<Element> _futureElements
Constructor Detail

FunctionDefinition

private FunctionDefinition()
Private constructor used only by JAXB.


FunctionDefinition

private FunctionDefinition(FunctionDefinition.Builder builder)
Method Detail

getId

public String getId()
Description copied from interface: Identifiable
The unique identifier for an object. This can be null.

Specified by:
getId in interface Identifiable
Returns:
the id

getNamespace

public String getNamespace()
Description copied from interface: FunctionDefinitionContract
Returns the namespace code of this function definition. All functions have a namespace and this value can never be null or blank. The combination of namespace plus name must be unique within the entire repository of functions.

Specified by:
getNamespace in interface FunctionDefinitionContract
Returns:
the namespace code of this function definition

getName

public String getName()
Description copied from interface: FunctionDefinitionContract
Returns the name of this function definition. All functions have a name and this value can never be null or blank. The combination of namespace plus name must be unique within the entire repository of functions.

Specified by:
getName in interface FunctionDefinitionContract
Returns:
the name of this function definition

getDescription

public String getDescription()
Description copied from interface: FunctionDefinitionContract
Returns the description of this function definition. The description is intended to provide more information about a function and it's appropriate usage. The description is optional.

Specified by:
getDescription in interface FunctionDefinitionContract
Returns:
the description of this function definition

getReturnType

public String getReturnType()
Description copied from interface: FunctionDefinitionContract
Returns the type of the return value of the function defined by this function definition. This can be one of a set of "built-in" data types or a custom data type represented as a fully qualified java class name. All functions must have a return type so this method should never return null or blank.

Specified by:
getReturnType in interface FunctionDefinitionContract
Returns:
the return type of this function definition

getTypeId

public String getTypeId()
Description copied from interface: FunctionDefinitionContract
Returns the id of the KrmsTypeDefinition which defines the actual implementation of this function such that it can be loaded into the engine and executed.

Specified by:
getTypeId in interface FunctionDefinitionContract
Returns:
the type id of this function definition

isActive

public boolean isActive()
Description copied from interface: Inactivatable
The active indicator for an object.

Specified by:
isActive in interface Inactivatable
Returns:
true if active false if not.

getVersionNumber

public Long getVersionNumber()
Description copied from interface: Versioned
Returns the version number for this object. In general, this value should only be null if the object has not yet been stored to a persistent data store. This version number is generally used for the purposes of optimistic locking.

Specified by:
getVersionNumber in interface Versioned
Returns:
the version number, or null if one has not been assigned yet

getParameters

public List<FunctionParameterDefinition> getParameters()
Description copied from interface: FunctionDefinitionContract
Returns an ordered, immutable list of the parameters which this function definition requires. This list can be empty (in the case of a function which has no arguments) but will never be null.

Specified by:
getParameters in interface FunctionDefinitionContract
Returns:
the list of parameters for this function definition

getCategories

public List<CategoryDefinition> getCategories()
Description copied from interface: FunctionDefinitionContract
Returns an ordered, immutable list of the categories which this function definition requires. This list can be empty (in the case of a function which has no arguments) but will never be null.

Specified by:
getCategories in interface FunctionDefinitionContract
Returns:
the list of categories for this function definition

hashCode

public int hashCode()
Description copied from interface: ModelObjectComplete
All "Complete" model object's should adhere to the ModelObjectComplete.hashCode() contract.

Specified by:
hashCode in interface ModelObjectComplete
Overrides:
hashCode in class Object
Returns:
the hashCode value

equals

public boolean equals(Object obj)
Description copied from interface: ModelObjectComplete
All "Complete" model object's should adhere to the ModelObjectComplete.equals(Object) contract.

Specified by:
equals in interface ModelObjectComplete
Overrides:
equals in class Object
Parameters:
obj - to object to compare for equality
Returns:
if equal

toString

public String toString()
Description copied from interface: ModelObjectBasic
This will return a proper string representation of the Model Object. All of the fields comprising the "public" api should be represented in the return value.

Specified by:
toString in interface ModelObjectBasic
Overrides:
toString in class Object
Returns:
the string representation


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.