/**
 * Some important properties:
 * orderID - annotated as the object unique space id (see the getter method for the annotation).
 * firstName (used to perform routing when working with partitioned space, see getter method for annotation).
 * status - indicating if this OrderEvent object in new, processed, or rejected.
 * type - Normal or Insecure
 * 
 * Annotations:
 * 
 * Fields with getters annotated as @SpaceProperty(index=IndexType.BASIC) are indexed.
 * Querying indexed fields speeds up read and take operations.
 * 
 * @SpaceRouting annotation (see getFirstName()) indicates that firstName field 
 * will be used as a routing index to perform routing when working with partitioned space.
 *
 * @SpaceClass annotation in this example is only to indicate that this class is a space class.
 */ 
@SpaceClass
public class OrderEvent {
	
	public static final String STATUS_NEW = "New";	
	public static final String STATUS_APPROVED = "Approved";	
	public static final String STATUS_REJECTED = "Rejected";
	public static final String PRIORITY_URGENT = "Insecure";
	public static final String PRIORITY_NORMAL = "Normal";
    
    private String orderID;
    private String feederID;
    private String firstName;
    private String lastName;
    private Integer riskInvolved;
    private Integer price;

    /**	Order status, Possible values: New, Approved, Rejected. */
    private String status;
    
    /**	Order type, Possible values: Normal, Insecure */
    private String type;		
    
    /** 
     * Gets the ID of the orderEvent.
     * @SpaceID annotation indicates that its value will be auto generated 
     * when it is written to the space. 
     */
    @SpaceId(autoGenerate = true)
    public String getOrderID() {
        return orderID;
    }
    
    /** 
     * @return userName - Gets the user name of the orderEvent object.
     * @SpaceProperty Defines if this field data is indexed.
	 */
    @SpaceProperty(index = IndexType.BASIC)
    public String getFirstName() {
        return firstName;
    }
    .
    .
    more constructors/getters/setters
    
}
GigaSpaces.com - Legal Notice - 3rd Party Licenses - Site Map - API Docs - Forum - Downloads - Blog - White Papers - Contact Tech Writing - Gen. by Atlassian Confluence