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 EdmSimpleType.BINARY
static OProperty<Byte[]> binary(String name, Byte[] value)
          Creates a new byte-array-valued OData property with EdmSimpleType.BINARY
static OProperty<Boolean> boolean_(String name, Boolean value)
          Creates a new boolean-valued OData property with EdmSimpleType.BOOLEAN
static OProperty<UnsignedByte> byte_(String name, UnsignedByte value)
          Creates a new unsigned-byte-valued OData property with EdmSimpleType.BYTE
static OProperty<Character> character(String name, Character value)
          Creates a new String-valued OData property with EdmSimpleType.STRING
static OProperty<OCollection<? extends OObject>> collection(String name, EdmCollectionType type, OCollection<? extends OObject> value)
          Creates a new collecion-valued OData property of the given edm-type.
static OProperty<List<OProperty<?>>> complex(String name, EdmComplexType 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 EdmSimpleType.DATETIME
static OProperty<LocalDateTime> datetime(String name, Date value)
          Creates a new LocalDateTime-valued OData property with EdmSimpleType.DATETIME
static OProperty<LocalDateTime> datetime(String name, Date value)
          Creates a new LocalDateTime-valued OData property with EdmSimpleType.DATETIME
static OProperty<LocalDateTime> datetime(String name, Instant value)
          Creates a new LocalDateTime-valued OData property with EdmSimpleType.DATETIME
static OProperty<LocalDateTime> datetime(String name, LocalDateTime value)
          Creates a new LocalDateTime-valued OData property with EdmSimpleType.DATETIME
static OProperty<LocalDateTime> datetime(String name, Time value)
          Creates a new LocalDateTime-valued OData property with EdmSimpleType.DATETIME
static OProperty<LocalDateTime> datetime(String name, Timestamp value)
          Creates a new LocalDateTime-valued OData property with EdmSimpleType.DATETIME
static OProperty<DateTime> datetimeOffset(String name, DateTime value)
          Creates a new DateTime-valued OData property with EdmSimpleType.DATETIMEOFFSET
static OProperty<BigDecimal> decimal(String name, BigDecimal value)
          Creates a new BigDecimal-valued OData property with EdmSimpleType.DECIMAL
static OProperty<BigDecimal> decimal(String name, BigInteger value)
          Creates a new BigDecimal-valued OData property with EdmSimpleType.DECIMAL
static OProperty<BigDecimal> decimal(String name, double value)
          Creates a new BigDecimal-valued OData property with EdmSimpleType.DECIMAL
static OProperty<BigDecimal> decimal(String name, long value)
          Creates a new BigDecimal-valued OData property with EdmSimpleType.DECIMAL
static OProperty<Double> double_(String name, Double value)
          Creates a new double-precision-valued OData property with EdmSimpleType.DOUBLE
static OProperty<Guid> guid(String name, Guid value)
          Creates a new Guid-valued OData property with EdmSimpleType.GUID
static OProperty<Guid> guid(String name, String value)
          Creates a new Guid-valued OData property with EdmSimpleType.GUID
static OProperty<Short> int16(String name, Short value)
          Creates a new short-valued OData property with EdmSimpleType.INT16
static OProperty<Integer> int32(String name, Integer value)
          Creates a new integer-valued OData property with EdmSimpleType.INT32
static OProperty<Long> int64(String name, Long value)
          Creates a new long-valued OData property with EdmSimpleType.INT64
static OProperty<?> null_(String name, EdmSimpleType<?> type)
          Creates a new OData property of the given edm simple type with a null value.
static OProperty<?> null_(String name, String fqSimpleTypeName)
          Creates a new OData property of the given edm simple type with a null value.
static OProperty<?> parseSimple(String name, EdmSimpleType type, String value)
          Creates a new OData property of the given edm-type with a value parsed from a string.
static OProperty<Byte> sbyte_(String name, byte value)
          Creates a new byte-valued OData property with EdmSimpleType.SBYTE
static
<T> OProperty<T>
simple(String name, EdmSimpleType<T> type, Object value)
          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 EdmSimpleType.SINGLE
static OProperty<String> string(String name, char value)
          Creates a new String-valued OData property with EdmSimpleType.STRING
static OProperty<String> string(String name, String value)
          Creates a new String-valued OData property with EdmSimpleType.STRING
static OProperty<LocalTime> time(String name, Calendar value)
          Creates a new LocalTime-valued OData property with EdmSimpleType.TIME
static OProperty<LocalTime> time(String name, Date value)
          Creates a new LocalTime-valued OData property with EdmSimpleType.TIME
static OProperty<LocalTime> time(String name, LocalTime value)
          Creates a new LocalTime-valued OData property with EdmSimpleType.TIME
static OProperty<LocalTime> time(String name, Time value)
          Creates a new LocalTime-valued OData property with EdmSimpleType.TIME
static OProperty<LocalTime> time(String name, Timestamp value)
          Creates a new LocalTime-valued OData property with EdmSimpleType.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 EdmSimpleType.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 EdmSimpleType.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 EdmSimpleType.BOOLEAN

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

byte_

public static OProperty<UnsignedByte> byte_(String name,
                                            UnsignedByte value)
Creates a new unsigned-byte-valued OData property with EdmSimpleType.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 EdmSimpleType.STRING

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

collection

public static OProperty<OCollection<? extends OObject>> collection(String name,
                                                                   EdmCollectionType type,
                                                                   OCollection<? extends OObject> value)
Creates a new collecion-valued OData property of the given edm-type.

Parameters:
name - the property name
type - the property edm-type of objects in the collection
value - the OCollection
Returns:
a new OData property instance

complex

public static OProperty<List<OProperty<?>>> complex(String name,
                                                    EdmComplexType 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 EdmSimpleType.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 EdmSimpleType.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 EdmSimpleType.DATETIME

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

datetime

public static OProperty<LocalDateTime> datetime(String name,
                                                Instant value)
Creates a new LocalDateTime-valued OData property with EdmSimpleType.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 EdmSimpleType.DATETIME

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

datetime

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

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

datetime

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

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

datetimeOffset

public static OProperty<DateTime> datetimeOffset(String name,
                                                 DateTime value)
Creates a new DateTime-valued OData property with EdmSimpleType.DATETIMEOFFSET

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 EdmSimpleType.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 EdmSimpleType.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 EdmSimpleType.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 EdmSimpleType.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 EdmSimpleType.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 EdmSimpleType.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 EdmSimpleType.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 EdmSimpleType.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 EdmSimpleType.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 EdmSimpleType.INT64

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

null_

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

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

null_

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

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

parseSimple

public static OProperty<?> parseSimple(String name,
                                       EdmSimpleType 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

sbyte_

public static OProperty<Byte> sbyte_(String name,
                                     byte value)
Creates a new byte-valued OData property with EdmSimpleType.SBYTE

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

simple

public static <T> OProperty<T> simple(String name,
                                      EdmSimpleType<T> type,
                                      Object 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,
                                      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 EdmSimpleType.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 EdmSimpleType.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 EdmSimpleType.STRING

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

time

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

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 EdmSimpleType.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 EdmSimpleType.TIME

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

time

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

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

time

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

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


http://odata4j.org