com.scooterframework.orm.sqldataexpress.object
Interface RESTified

All Known Implementing Classes:
ActiveRecord, RowData, Tag, Tagging

public interface RESTified

RESTfied defines methods for operating as a resource.

The most important feature of a RESTfied resource is the presence of an ID. That is, the resource can be identified by the id.

The ID is not necessarily a primary key field of a record. However, it is always constructed from a primary key or a composite primary key.


Method Summary
 java.lang.String getRestfulId()
          Returns the restified id of the resource.
 java.util.Map<java.lang.String,java.lang.Object> getRestfulIdMap()
          Returns the data map for the restified id.
 java.lang.String[] getRestfulIdNames()
          Returns column names corresponding to the id.
 void setRestfulId(java.lang.String id)
          Sets the id value of the resource.
 

Method Detail

getRestfulId

java.lang.String getRestfulId()
Returns the restified id of the resource.

Returns:
id String

getRestfulIdNames

java.lang.String[] getRestfulIdNames()
Returns column names corresponding to the id.

Returns:
a string array

getRestfulIdMap

java.util.Map<java.lang.String,java.lang.Object> getRestfulIdMap()
Returns the data map for the restified id.

Returns:
map of restified id data

setRestfulId

void setRestfulId(java.lang.String id)

Sets the id value of the resource. The format of the id string must follow the pattern of the corresponding id config. If the id is backed by a composite primary key, dash must be used to link the value of each primary key field together.

 Examples:
   id string          id config array         description
   ---------          ---------------         -------
     0001             [id]                    an order
     0001-99          [order_id, id]          an item of an order
 
 

Parameters:
id -