Package dk.vajhoej.model.core
Class Connection
- java.lang.Object
-
- dk.vajhoej.model.Versioned
-
- dk.vajhoej.model.core.Connection
-
- All Implemented Interfaces:
Duplicatable
,Persistable
,java.io.Serializable
,java.lang.Cloneable
public class Connection extends Versioned implements Persistable, Duplicatable, java.io.Serializable
Class Connection represents a connection between boxes.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Connection()
Create instance of Connection.Connection(Version version, java.lang.String stack)
Create instance of Connection.Connection(Version version, java.lang.String stack, ConnectionType conntype)
Create instance of Connection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Connection
duplicate()
Duplicate object.boolean
equals(java.lang.Object o)
NameValuePairList
getAttributes()
Get all single value fields.java.util.List<java.util.List<Persistable>>
getChildren()
Get all multi value fields.ConnectionType
getConntype()
Get connection type.java.lang.String
getId()
Get id identifying object.java.lang.String
getStack()
Get protocol stack.java.lang.String
getType()
Get type (XML element name / database table name not Java class name).int
hashCode()
void
setAttributes(NameValuePairList attr)
Set all single value fields.void
setChildren(java.util.List<java.util.List<Persistable>> childs)
Set all multi value fields.void
setId(int id)
Set ID.void
setId(java.lang.String id)
Set ID.void
setStack(java.lang.String stack)
Set protocol stack.java.lang.String
toString()
-
Methods inherited from class dk.vajhoej.model.Versioned
clone, getVersion, setVersion
-
-
-
-
Constructor Detail
-
Connection
public Connection()
Create instance of Connection.
-
Connection
public Connection(Version version, java.lang.String stack)
Create instance of Connection.- Parameters:
version
- versionstack
- protocol stack
-
Connection
public Connection(Version version, java.lang.String stack, ConnectionType conntype)
Create instance of Connection.- Parameters:
version
- versionstack
- protocol stackconntype
- connection type
-
-
Method Detail
-
getStack
public java.lang.String getStack()
Get protocol stack.- Returns:
- protocol stack.
-
setStack
public void setStack(java.lang.String stack)
Set protocol stack.- Parameters:
stack
- protocol stack
-
getConntype
public ConnectionType getConntype()
Get connection type.- Returns:
- connection type
-
setId
public void setId(java.lang.String id)
Set ID.- Parameters:
id
- id
-
setId
public void setId(int id)
Set ID.- Parameters:
id
- id
-
duplicate
public Connection duplicate()
Description copied from interface:Duplicatable
Duplicate object. The result will have the same characteristics as the original but may not be equal to it.- Specified by:
duplicate
in interfaceDuplicatable
- Returns:
- duplicate
-
getId
public java.lang.String getId()
Description copied from interface:Persistable
Get id identifying object.- Specified by:
getId
in interfacePersistable
- Returns:
- id
-
getType
public java.lang.String getType()
Description copied from interface:Persistable
Get type (XML element name / database table name not Java class name).- Specified by:
getType
in interfacePersistable
- Returns:
- type
-
getAttributes
public NameValuePairList getAttributes()
Description copied from interface:Persistable
Get all single value fields.- Specified by:
getAttributes
in interfacePersistable
- Returns:
- name value pair list
-
getChildren
public java.util.List<java.util.List<Persistable>> getChildren()
Description copied from interface:Persistable
Get all multi value fields.- Specified by:
getChildren
in interfacePersistable
- Returns:
- list of list of persistable objects
-
setAttributes
public void setAttributes(NameValuePairList attr) throws ModelException
Description copied from interface:Persistable
Set all single value fields.- Specified by:
setAttributes
in interfacePersistable
- Parameters:
attr
- value pair list- Throws:
ModelException
- if problems
-
setChildren
public void setChildren(java.util.List<java.util.List<Persistable>> childs)
Description copied from interface:Persistable
Set all multi value fields.- Specified by:
setChildren
in interfacePersistable
- Parameters:
childs
- list of list of persistable objects
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-