secondaryindex

## Class BillInfo

- java.lang.Object
- - secondaryindex.BillInfo

-     public class BillInfo
      extends Object

  This class embodies the BillInfo schema.

  BillInfo has an "id" as its primary key and several attributes in the data portion as defined in "billinfo-schema.avsc":

       { "type": "record", "name": "PrimaryDBValue", "namespace":
         "oracle.kv.secondaryIndex", "fields":
         [ {"name": "name", "type": "string", "default": ""},
           {"name": "email", "type": "string", "default": ""},
           {"name": "phone", "type": "string", "default": ""},
           {"name": "date", "type": "string", "default": ""},
           {"name": "cost", "type": "long", "default": 0} ] }

  This class also implements methods to construct primary DB KV pairs using the Binding class.

  The major key for BillInfo records has two elements: (1) The literal "BI", and (2) The "id" field. There is no minor key component for BillInfo records. The Value portion of these records are the other components (name, email, phone, date, cost) and are serialized using GenericAvroBinding.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `BILL_INFO_TYPE` An identifier used as the first String component of the Key's major path.
    `static String` | `COST`
    `static String` | `DATE`
    `static String` | `EMAIL`
    `static String` | `ID`
    `static String` | `NAME`
    `static String` | `PHONE`
    `static String` | `SCHEMA_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BillInfo(Binding binding, Key key, Value value)`
    `BillInfo(String id)`
    `BillInfo(String id, String name, String email, String phone, String date, long cost)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `(package private) static Key` | `getBillInfoPrefixKey()`
    `(package private) long` | `getCost()`
    `(package private) String` | `getDate()`
    `(package private) String` | `getEmail()`
    `(package private) String` | `getId()`
    `(package private) String` | `getName()`
    `(package private) String` | `getPhone()`
    `(package private) Key` | `getStoreKey()`
    `(package private) Value` | `getStoreValue(Binding binding)` Serializes bill attributes into the byte array of a Value.
    `int` | `hashCode()`
    `(package private) static boolean` | `isProperty(String attributeName)` Checks whether the given attribute name belongs to the BillInfo schema.
    `(package private) void` | `setCost(long cost)`
    `(package private) void` | `setDate(String date)`
    `(package private) void` | `setEmail(String email)`
    `(package private) void` | `setName(String name)`
    `(package private) void` | `setPhone(String phone)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### SCHEMA_NAME

          public static final String SCHEMA_NAME

      See Also:
        Constant Field Values

    - #### ID

          public static final String ID

      See Also:
        Constant Field Values

    - #### NAME

          public static final String NAME

      See Also:
        Constant Field Values

    - #### EMAIL

          public static final String EMAIL

      See Also:
        Constant Field Values

    - #### PHONE

          public static final String PHONE

      See Also:
        Constant Field Values

    - #### DATE

          public static final String DATE

      See Also:
        Constant Field Values

    - #### COST

          public static final String COST

      See Also:
        Constant Field Values

    - #### BILL_INFO_TYPE

          public static final String BILL_INFO_TYPE

      An identifier used as the first String component of the Key's major path.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### BillInfo

          BillInfo(String id)

    - #### BillInfo

          BillInfo(String id,
                  String name,
                  String email,
                  String phone,
                  String date,
                  long cost)

    - #### BillInfo

          BillInfo(Binding binding,
                  Key key,
                  Value value)

  - ### Method Detail

    - #### getId

          String getId()

    - #### getName

          String getName()

    - #### setName

          void setName(String name)

    - #### getEmail

          String getEmail()

    - #### setEmail

          void setEmail(String email)

    - #### getPhone

          String getPhone()

    - #### setPhone

          void setPhone(String phone)

    - #### getDate

          String getDate()

    - #### setDate

          void setDate(String date)

    - #### getCost

          long getCost()

    - #### setCost

          void setCost(long cost)

    - #### isProperty

          static boolean isProperty(String attributeName)

      Checks whether the given attribute name belongs to the BillInfo schema.

    - #### getBillInfoPrefixKey

          static Key getBillInfoPrefixKey()

    - #### getStoreKey

          Key getStoreKey()

    - #### getStoreValue

          Value getStoreValue(Binding binding)

      Serializes bill attributes into the byte array of a Value.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

Copyright (c) 2011, 2014 Oracle and/or its affiliates. All rights reserved.