org.gbanga.api
Class Resource

java.lang.Object
  extended by org.gbanga.api.Entity
      extended by org.gbanga.api.Resource
All Implemented Interfaces:
Good

public class Resource
extends Entity
implements Good

An accumulation of a given type of resource.

Details about JSON serialization

For the JSON object serialization, the field names are used. Eg.

 {
   amount: 82340,
   type: 12
 }
 

Fields annotated with PrimaryKey are used, if not the whole object is sent. HideIfNull indicates that the field is not sent at all, if the value is not set.

Author:
Matthias

Field Summary
 int amount
          The amount of this type of resource represented by this object instance
 long id
          The unique identifier for this Resource.
 int image
          The id of the representing image
 long type
          The type of the Resource
 
Constructor Summary
Resource()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

amount

public int amount
The amount of this type of resource represented by this object instance


id

@PrimaryKey
public long id
The unique identifier for this Resource.


image

public int image
The id of the representing image


type

public long type
The type of the Resource

Constructor Detail

Resource

public Resource()