pl.edu.agh.cast.model.mapper
Interface Mappable

All Known Subinterfaces:
IDataSet, IEntity, IModel, IRelation, ITimedRelation
All Known Implementing Classes:
AbstractMappable, DataSet, Entity, Model, Relation, TimedRelation

public interface Mappable

The mappable interface should be implemented by all classes mapped to the base model.

Author:
AGH CAST Team

Method Summary
 Mappable clone()
          Clones the mappable.
 Object getAttribute(String name)
          Value of the attribute with name 'name' mapped to the base model.
 String[] getAttributeNames()
          Array of names of attributes mapped to the base model.
 Class getAttributeType(String name)
          Returns the type of the attribute with given name.
 String getId()
          Domain specific id of the object.
 long getMid()
          The base model id of the object.
 String getType()
          The mapped type of the object.
 void setAttribute(String name, Object value)
          Sets the value of the attribute with given name.
 void setId(String id)
          Domain specific id setter.
 void setMid(long id)
          Base model id setter.
 

Method Detail

getMid

long getMid()
The base model id of the object.

Returns:
Base model id.

setMid

void setMid(long id)
Base model id setter.

Parameters:
id - to set.

getId

String getId()
Domain specific id of the object.

Returns:
The id of the object.

setId

void setId(String id)
Domain specific id setter.

Parameters:
id - The id to set.

getAttribute

Object getAttribute(String name)
Value of the attribute with name 'name' mapped to the base model.

Parameters:
name - The name of the attribute
Returns:
The value of the attribute

getAttributeNames

String[] getAttributeNames()
Array of names of attributes mapped to the base model.

Returns:
array of names.

getAttributeType

Class getAttributeType(String name)
Returns the type of the attribute with given name.

Parameters:
name - The name of the attribute.
Returns:
The type (class) of the attribute.

setAttribute

void setAttribute(String name,
                  Object value)
Sets the value of the attribute with given name.

Parameters:
name - The name of the attribute.
value - The value of the attribute.

getType

String getType()
The mapped type of the object.

Returns:
The type.

clone

Mappable clone()
Clones the mappable.

Returns:
Copy of the object.


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.