org.odata4j.core
Class OProperties

java.lang.Object
  extended by org.odata4j.core.OProperties

public class OProperties
extends Object

A static factory to create immutable OProperty instances.


Method Summary
static OProperty<byte[]> binary(String name, byte[] value)
          Creates a new byte-array-valued OData property with EdmType.BINARY
static OProperty<Byte[]> binary(String name, Byte[] value)
          Creates a new byte-array-valued OData property with EdmType.BINARY
static OProperty<Boolean> boolean_(String name, Boolean value)
          Creates a new boolean-valued OData property with EdmType.BOOLEAN
static OProperty<Byte> byte_(String name, byte value)
          Creates a new byte-valued OData property with EdmType.BYTE
static OProperty<Character> character(String name, Character value)
          Creates a new String-valued OData property with EdmType.STRING
static OProperty<List<OProperty<?>>> complex(String name, String type, List<OProperty<?>> value)
          Creates a new complex-valued OData property of the given edm-type.
static OProperty<LocalDateTime> datetime(String name, Calendar value)
          Creates a new LocalDateTime-valued OData property with EdmType.DATETIME
static OProperty<LocalDateTime> datetime(String name, Date value)
          Creates a new LocalDateTime-valued OData property with EdmType.DATETIME
static OProperty<LocalDateTime> datetime(String name, LocalDateTime value)
          Creates a new LocalDateTime-valued OData property with EdmType.DATETIME
static OProperty<BigDecimal> decimal(String name, BigDecimal value)
          Creates a new BigDecimal-valued OData property with EdmType.DECIMAL
static OProperty<BigDecimal> decimal(String name, BigInteger value)
          Creates a new BigDecimal-valued OData property with EdmType.DECIMAL
static OProperty<BigDecimal> decimal(String name, double value)
          Creates a new BigDecimal-valued OData property with EdmType.DECIMAL
static OProperty<BigDecimal> decimal(String name, long value)
          Creates a new BigDecimal-valued OData property with EdmType.DECIMAL
static OProperty<Double> double_(String name, Double value)
          Creates a new double-precision-valued OData property with EdmType.DOUBLE
static OProperty<Guid> guid(String name, Guid value)
          Creates a new Guid-valued OData property with EdmType.GUID
static OProperty<Guid> guid(String name, String value)
          Creates a new Guid-valued OData property with EdmType.GUID
static OProperty<Short> int16(String name, Short value)
          Creates a new short-valued OData property with EdmType.INT16
static OProperty<Integer> int32(String name, Integer value)
          Creates a new integer-valued OData property with EdmType.INT32
static OProperty<Long> int64(String name, Long value)
          Creates a new long-valued OData property with EdmType.INT64
static OProperty<?> null_(String name, String type)
          Creates a new OData property of the given edm-type with a null value.
static OProperty<?> parse(String name, String type, String value)
          Creates a new OData property of the given edm-type with a value parsed from a string.
static
<T> OProperty<T>
simple(String name, EdmType type, T value)
          Creates a new OData property of the given edm-type.
static
<T> OProperty<T>
simple(String name, EdmType type, T value, boolean exceptionOnUnknownType)
          Creates a new OData property of the given edm-type.
static
<T> OProperty<T>
simple(String name, T value)
          Creates a new OData property, inferring the edm-type from the value provided, which cannot be null.
static OProperty<Float> single(String name, Float value)
          Creates a new single-precision-valued OData property with EdmType.SINGLE
static OProperty<String> string(String name, char value)
          Creates a new String-valued OData property with EdmType.STRING
static OProperty<String> string(String name, String value)
          Creates a new String-valued OData property with EdmType.STRING
static OProperty<LocalTime> time(String name, Date value)
          Creates a new LocalTime-valued OData property with EdmType.TIME
static OProperty<LocalTime> time(String name, LocalTime value)
          Creates a new LocalTime-valued OData property with EdmType.TIME
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

binary

public static OProperty<byte[]> binary(String name,
                                       byte[] value)
Creates a new byte-array-valued OData property with EdmType.BINARY

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

binary

public static OProperty<Byte[]> binary(String name,
                                       Byte[] value)
Creates a new byte-array-valued OData property with EdmType.BINARY

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

boolean_

public static OProperty<Boolean> boolean_(String name,
                                          Boolean value)
Creates a new boolean-valued OData property with EdmType.BOOLEAN

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

byte_

public static OProperty<Byte> byte_(String name,
                                    byte value)
Creates a new byte-valued OData property with EdmType.BYTE

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

character

public static OProperty<Character> character(String name,
                                             Character value)
Creates a new String-valued OData property with EdmType.STRING

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

complex

public static OProperty<List<OProperty<?>>> complex(String name,
                                                    String type,
                                                    List<OProperty<?>> value)
Creates a new complex-valued OData property of the given edm-type.

Parameters:
name - the property name
type - the property edm-type
value - the property values
Returns:
a new OData property instance

datetime

public static OProperty<LocalDateTime> datetime(String name,
                                                Calendar value)
Creates a new LocalDateTime-valued OData property with EdmType.DATETIME

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

datetime

public static OProperty<LocalDateTime> datetime(String name,
                                                Date value)
Creates a new LocalDateTime-valued OData property with EdmType.DATETIME

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

datetime

public static OProperty<LocalDateTime> datetime(String name,
                                                LocalDateTime value)
Creates a new LocalDateTime-valued OData property with EdmType.DATETIME

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

decimal

public static OProperty<BigDecimal> decimal(String name,
                                            BigDecimal value)
Creates a new BigDecimal-valued OData property with EdmType.DECIMAL

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

decimal

public static OProperty<BigDecimal> decimal(String name,
                                            BigInteger value)
Creates a new BigDecimal-valued OData property with EdmType.DECIMAL

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

decimal

public static OProperty<BigDecimal> decimal(String name,
                                            double value)
Creates a new BigDecimal-valued OData property with EdmType.DECIMAL

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

decimal

public static OProperty<BigDecimal> decimal(String name,
                                            long value)
Creates a new BigDecimal-valued OData property with EdmType.DECIMAL

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

double_

public static OProperty<Double> double_(String name,
                                        Double value)
Creates a new double-precision-valued OData property with EdmType.DOUBLE

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

guid

public static OProperty<Guid> guid(String name,
                                   Guid value)
Creates a new Guid-valued OData property with EdmType.GUID

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

guid

public static OProperty<Guid> guid(String name,
                                   String value)
Creates a new Guid-valued OData property with EdmType.GUID

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

int16

public static OProperty<Short> int16(String name,
                                     Short value)
Creates a new short-valued OData property with EdmType.INT16

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

int32

public static OProperty<Integer> int32(String name,
                                       Integer value)
Creates a new integer-valued OData property with EdmType.INT32

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

int64

public static OProperty<Long> int64(String name,
                                    Long value)
Creates a new long-valued OData property with EdmType.INT64

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

null_

public static OProperty<?> null_(String name,
                                 String type)
Creates a new OData property of the given edm-type with a null value.

Parameters:
name - the property name
type - the property edm-type
Returns:
a new OData property instance

parse

public static OProperty<?> parse(String name,
                                 String type,
                                 String value)
Creates a new OData property of the given edm-type with a value parsed from a string.

Parameters:
name - the property name
type - the property edm-type
value - the property value
Returns:
a new OData property instance

simple

public static <T> OProperty<T> simple(String name,
                                      EdmType type,
                                      T value)
Creates a new OData property of the given edm-type.

Type Parameters:
T - the property value's java-type
Parameters:
name - the property name
type - the property edm-type
value - the property value
Returns:
a new OData property instance

simple

public static <T> OProperty<T> simple(String name,
                                      EdmType type,
                                      T value,
                                      boolean exceptionOnUnknownType)
Creates a new OData property of the given edm-type.

Type Parameters:
T - the property value's java-type
Parameters:
name - the property name
type - the property edm-type
value - the property value
exceptionOnUnknownType - if true, throw if the edm-type is unknown
Returns:
a new OData property instance

simple

public static <T> OProperty<T> simple(String name,
                                      T value)
Creates a new OData property, inferring the edm-type from the value provided, which cannot be null.

Type Parameters:
T - the property value's java-type
Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

single

public static OProperty<Float> single(String name,
                                      Float value)
Creates a new single-precision-valued OData property with EdmType.SINGLE

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

string

public static OProperty<String> string(String name,
                                       char value)
Creates a new String-valued OData property with EdmType.STRING

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

string

public static OProperty<String> string(String name,
                                       String value)
Creates a new String-valued OData property with EdmType.STRING

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

time

public static OProperty<LocalTime> time(String name,
                                        Date value)
Creates a new LocalTime-valued OData property with EdmType.TIME

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance

time

public static OProperty<LocalTime> time(String name,
                                        LocalTime value)
Creates a new LocalTime-valued OData property with EdmType.TIME

Parameters:
name - the property name
value - the property value
Returns:
a new OData property instance


http://odata4j.org