# Class PropertyFactory

java.lang.Object
org.apache.cayenne.exp.property.PropertyFactory

public class PropertyFactory extends Object
Factory class that produces all property types.

Since:
  4.2
See Also:
  - `org.apache.cayenne.exp.property`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final NumericProperty<Long>`
  `COUNT`
  Property that can be used to select `COUNT(*)`
  `static final DateProperty<LocalDateTime>`
  `NOW`
  Property that corresponds to SQL function `NOW()`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PropertyFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <T> BaseProperty<T>`
  `createBase(String name, Class<T> type)`
  Create base property
  `static <T> BaseProperty<T>`
  `createBase(String name, Expression expression, Class<T> type)`
  Create base property
  `static <T> BaseProperty<T>`
  `createBase(Expression expression, Class<T> type)`
  Create base property
  `static <T> BaseProperty<T>`
  `createBase(CayennePath path, Class<T> type)`
  Create base property
  `static <T> BaseProperty<T>`
  `createBase(CayennePath path, Expression expression, Class<T> type)`
  Create base property
  `static <T> BaseIdProperty<T>`
  `createBaseId(String attribute, String entityName, Class<T> propertyType)`
  `static <T> BaseIdProperty<T>`
  `createBaseId(String attribute, String path, String entityName, Class<T> propertyType)`
  `static <T> BaseIdProperty<T>`
  `createBaseId(String attribute, CayennePath path, String entityName, Class<T> propertyType)`
  Create property that represents base ID
  `static <T> DateProperty<T>`
  `createDate(String name, Class<T> type)`
  Create date property
  `static <T> DateProperty<T>`
  `createDate(String name, Expression expression, Class<T> type)`
  Create date property
  `static <T> DateProperty<T>`
  `createDate(Expression expression, Class<T> type)`
  Create date property
  `static <T> DateProperty<T>`
  `createDate(CayennePath path, Class<T> type)`
  Create date property
  `static <T> DateProperty<T>`
  `createDate(CayennePath path, Expression expression, Class<T> type)`
  Create date property
  `static <T extends EmbeddableObject>
  EmbeddableProperty<T>`
  `createEmbeddable(String name, Class<T> embeddableType)`
  Create property that represents embeddable
  `static <T extends EmbeddableObject>
  EmbeddableProperty<T>`
  `createEmbeddable(String name, Expression exp, Class<T> embeddableType)`
  Create property that represents embeddable
  `static <T extends EmbeddableObject>
  EmbeddableProperty<T>`
  `createEmbeddable(CayennePath path, Class<T> embeddableType)`
  Create property that represents embeddable
  `static <T extends EmbeddableObject>
  EmbeddableProperty<T>`
  `createEmbeddable(CayennePath path, Expression exp, Class<T> embeddableType)`
  Create property that represents embeddable
  `static <T extends Persistent>
  EntityProperty<T>`
  `createEntity(String name, Class<T> type)`
  Create entity property
  `static <T extends Persistent>
  EntityProperty<T>`
  `createEntity(String name, Expression expression, Class<T> entityType)`
  Create entity property
  `static <T extends Persistent>
  EntityProperty<T>`
  `createEntity(Expression expression, Class<T> type)`
  Create entity property
  `static <T extends Persistent>
  EntityProperty<T>`
  `createEntity(CayennePath path, Class<T> type)`
  Create entity property
  `static <T extends Persistent>
  EntityProperty<T>`
  `createEntity(CayennePath path, Expression expression, Class<T> entityType)`
  Create entity property
  `static <T extends Persistent>
  ListProperty<T>`
  `createList(String name, Class<T> entityType)`
  Create to-many relationship mapped on list property
  `static <T extends Persistent>
  ListProperty<T>`
  `createList(String name, Expression expression, Class<T> entityType)`
  Create to-many relationship mapped on list property
  `static <T extends Persistent>
  ListProperty<T>`
  `createList(CayennePath path, Class<T> entityType)`
  Create to-many relationship mapped on list property
  `static <T extends Persistent>
  ListProperty<T>`
  `createList(CayennePath path, Expression expression, Class<T> entityType)`
  Create to-many relationship mapped on list property
  `static <K, V extends Persistent>
  MapProperty<K,V>`
  `createMap(String name, Class<K> keyType, Class<V> entityType)`
  Create to-many relationship mapped on map property
  `static <K, V extends Persistent>
  MapProperty<K,V>`
  `createMap(String name, Expression expression, Class<K> keyType, Class<V> entityType)`
  Create to-many relationship mapped on map property
  `static <K, V extends Persistent>
  MapProperty<K,V>`
  `createMap(CayennePath path, Class<K> keyType, Class<V> entityType)`
  Create to-many relationship mapped on map property
  `static <K, V extends Persistent>
  MapProperty<K,V>`
  `createMap(CayennePath path, Expression expression, Class<K> keyType, Class<V> entityType)`
  Create to-many relationship mapped on map property
  `static <T extends Number>
  NumericProperty<T>`
  `createNumeric(String name, Class<T> type)`
  Create numeric property
  `static <T extends Number>
  NumericProperty<T>`
  `createNumeric(String name, Expression expression, Class<T> type)`
  Create numeric property
  `static <T extends Number>
  NumericProperty<T>`
  `createNumeric(Expression expression, Class<T> type)`
  Create numeric property
  `static <T extends Number>
  NumericProperty<T>`
  `createNumeric(CayennePath path, Expression expression, Class<T> type)`
  Create numeric property
  `static <T extends Number>
  NumericIdProperty<T>`
  `createNumericId(String attribute, String entityName, Class<T> propertyType)`
  `static <T extends Number>
  NumericIdProperty<T>`
  `createNumericId(String attribute, String path, String entityName, Class<T> propertyType)`
  `static <T extends Number>
  NumericIdProperty<T>`
  `createNumericId(String attribute, CayennePath path, String entityName, Class<T> propertyType)`
  `static <T extends Persistent>
  SelfProperty<T>`
  `createSelf(Class<T> type)`
  Self property allows to create column queries that return full objects along with custom column set.
  `static <T extends Persistent>
  EntityProperty<T>`
  `createSelf(Expression expression, Class<T> type)`
  Self property allows to create column queries that return full objects along with custom column set.
  `static <T extends Persistent>
  SetProperty<T>`
  `createSet(String name, Class<T> entityType)`
  Create to-many relationship mapped on set property
  `static <T extends Persistent>
  SetProperty<T>`
  `createSet(String name, Expression expression, Class<T> entityType)`
  Create to-many relationship mapped on set property
  `static <T extends Persistent>
  SetProperty<T>`
  `createSet(CayennePath path, Class<T> entityType)`
  Create to-many relationship mapped on set property
  `static <T extends Persistent>
  SetProperty<T>`
  `createSet(CayennePath path, Expression expression, Class<T> entityType)`
  Create to-many relationship mapped on set property
  `static <T extends CharSequence>
  StringProperty<T>`
  `createString(String name, Class<T> type)`
  Create string property
  `static <T extends CharSequence>
  StringProperty<T>`
  `createString(String name, Expression expression, Class<T> type)`
  Create string property
  `static <T extends CharSequence>
  StringProperty<T>`
  `createString(Expression expression, Class<T> type)`
  Create string property
  `static <T extends CharSequence>
  StringProperty<T>`
  `createString(CayennePath path, Class<T> type)`
  Create string property
  `static <T extends CharSequence>
  StringProperty<T>`
  `createString(CayennePath path, Expression expression, Class<T> type)`
  Create string property

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### COUNT

    public static final NumericProperty<Long> COUNT
    Property that can be used to select `COUNT(*)`

    Usage:

        ObjectSelect.columnQuery(Artist.class, Artist.ARTIST_NAME, PropertyFactory.COUNT);

    See Also:
      - `ObjectSelect.selectCount(ObjectContext)`

  - ### NOW

    public static final DateProperty<LocalDateTime> NOW
    Property that corresponds to SQL function `NOW()`

    Usage:

        ObjectSelect.query(Artist.class).where(Artist.DATE_OF_BIRTH.year().lt(PropertyFactory.NOW.year().sub(100)));

- ## Constructor Details

  - ### PropertyFactory

    public PropertyFactory()

- ## Method Details

  - ### createBase

    public static <T> BaseProperty<T> createBase(String name, Expression expression, Class<T> type)
    Create base property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `name` - of the property
      `expression` - that property will use
      `type` - type of represented attribute
    Returns:
      new property with custom expression

  - ### createBase

    public static <T> BaseProperty<T> createBase(CayennePath path, Expression expression, Class<T> type)
    Create base property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `path` - of the property
      `expression` - that property will use
      `type` - type of represented attribute
    Returns:
      new property with custom expression
    Since:
      5.0

  - ### createBase

    public static <T> BaseProperty<T> createBase(String name, Class<T> type)
    Create base property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `name` - of the property, will be used as value for path expression
      `type` - type of represented attribute
    Returns:
      new path property

  - ### createBase

    public static <T> BaseProperty<T> createBase(CayennePath path, Class<T> type)
    Create base property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `path` - of the property, will be used as value for path expression
      `type` - type of represented attribute
    Returns:
      new path property
    Since:
      5.0

  - ### createBase

    public static <T> BaseProperty<T> createBase(Expression expression, Class<T> type)
    Create base property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `expression` - that property will use
      `type` - type of represented attribute
    Returns:
      new property with custom expression without name

  - ### createString

    public static <T extends CharSequence> StringProperty<T> createString(CayennePath path, Expression expression, Class<T> type)
    Create string property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `path` - of the property
      `expression` - that property will use
      `type` - type of represented attribute
    Returns:
      new property with custom expression
    Since:
      5.0

  - ### createString

    public static <T extends CharSequence> StringProperty<T> createString(String name, Expression expression, Class<T> type)
    Create string property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `name` - of the property
      `expression` - that property will use
      `type` - type of represented attribute
    Returns:
      new property with custom expression

  - ### createString

    public static <T extends CharSequence> StringProperty<T> createString(CayennePath path, Class<T> type)
    Create string property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `path` - of the property, will be used as value for path expression
      `type` - type of represented attribute
    Returns:
      new path property
    Since:
      5.0

  - ### createString

    public static <T extends CharSequence> StringProperty<T> createString(String name, Class<T> type)
    Create string property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `name` - of the property, will be used as value for path expression
      `type` - type of represented attribute
    Returns:
      new path property

  - ### createString

    public static <T extends CharSequence> StringProperty<T> createString(Expression expression, Class<T> type)
    Create string property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `expression` - that property will use
      `type` - type of represented attribute
    Returns:
      new property with custom expression without name

  - ### createNumeric

    public static <T extends Number> NumericProperty<T> createNumeric(CayennePath path, Expression expression, Class<T> type)
    Create numeric property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `path` - of the property
      `expression` - that property will use
      `type` - type of represented attribute
    Returns:
      new property with custom expression
    Since:
      5.0

  - ### createNumeric

    public static <T extends Number> NumericProperty<T> createNumeric(String name, Expression expression, Class<T> type)
    Create numeric property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `name` - of the property
      `expression` - that property will use
      `type` - type of represented attribute
    Returns:
      new property with custom expression

  - ### createNumeric

    public static <T extends Number> NumericProperty<T> createNumeric(String name, Class<T> type)
    Create numeric property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `name` - of the property, will be used as value for path expression
      `type` - type of represented attribute
    Returns:
      new path property

  - ### createNumeric

    public static <T extends Number> NumericProperty<T> createNumeric(Expression expression, Class<T> type)
    Create numeric property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `expression` - that property will use
      `type` - type of represented attribute
    Returns:
      new property with custom expression without name

  - ### createDate

    public static <T> DateProperty<T> createDate(CayennePath path, Expression expression, Class<T> type)
    Create date property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `path` - of the property
      `expression` - that property will use
      `type` - type of represented attribute
    Returns:
      new property with custom expression
    Since:
      5.0

  - ### createDate

    public static <T> DateProperty<T> createDate(String name, Expression expression, Class<T> type)
    Create date property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `name` - of the property
      `expression` - that property will use
      `type` - type of represented attribute
    Returns:
      new property with custom expression

  - ### createDate

    public static <T> DateProperty<T> createDate(CayennePath path, Class<T> type)
    Create date property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `path` - of the property, will be used as value for path expression
      `type` - type of represented attribute
    Returns:
      new path property
    Since:
      5.0

  - ### createDate

    public static <T> DateProperty<T> createDate(String name, Class<T> type)
    Create date property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `name` - of the property, will be used as value for path expression
      `type` - type of represented attribute
    Returns:
      new path property

  - ### createDate

    public static <T> DateProperty<T> createDate(Expression expression, Class<T> type)
    Create date property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `expression` - that property will use
      `type` - type of represented attribute
    Returns:
      new property with custom expression without name

  - ### createEntity

    public static <T extends Persistent> EntityProperty<T> createEntity(CayennePath path, Expression expression, Class<T> entityType)
    Create entity property
    Type Parameters:
      `T` - type of represented relationship entity
    Parameters:
      `path` - of the property
      `expression` - that property will use
      `entityType` - type of represented relationship entity
    Returns:
      new property with custom expression
    Since:
      5.0

  - ### createEntity

    public static <T extends Persistent> EntityProperty<T> createEntity(String name, Expression expression, Class<T> entityType)
    Create entity property
    Type Parameters:
      `T` - type of represented relationship entity
    Parameters:
      `name` - of the property
      `expression` - that property will use
      `entityType` - type of represented relationship entity
    Returns:
      new property with custom expression

  - ### createEntity

    public static <T extends Persistent> EntityProperty<T> createEntity(CayennePath path, Class<T> type)
    Create entity property
    Type Parameters:
      `T` - type of represented relationship entity
    Parameters:
      `path` - of the property, will be used as value for path expression
      `type` - type of represented relationship entity
    Returns:
      new path property
    Since:
      5.0

  - ### createEntity

    public static <T extends Persistent> EntityProperty<T> createEntity(String name, Class<T> type)
    Create entity property
    Type Parameters:
      `T` - type of represented relationship entity
    Parameters:
      `name` - of the property, will be used as value for path expression
      `type` - type of represented relationship entity
    Returns:
      new path property

  - ### createEntity

    public static <T extends Persistent> EntityProperty<T> createEntity(Expression expression, Class<T> type)
    Create entity property
    Type Parameters:
      `T` - type of represented relationship entity
    Parameters:
      `expression` - that property will use
      `type` - type of represented relationship entity
    Returns:
      new property with custom expression without name

  - ### createSelf

    public static <T extends Persistent> SelfProperty<T> createSelf(Class<T> type)
    Self property allows to create column queries that return full objects along with custom column set.

    Usage example, query will return object with dependent objects count:

         List<Object[]> result = ObjectSelect.columnQuery(Artist.class,
                 PropertyFactory.createSelf(Artist.class),
                 Artist.PAINTING_ARRAY.count())
             .select(context);

    Type Parameters:
      `T` - type of represented entity
    Parameters:
      `type` - of represented entity
    Returns:
      new 'self' property

  - ### createSelf

    public static <T extends Persistent> EntityProperty<T> createSelf(Expression expression, Class<T> type)
    Self property allows to create column queries that return full objects along with custom column set.

    This method is not much useful, as to-one property can be used as is in this case, example is purely for demonstration purpose only. See `EntityProperty` usage examples.

    Usage example, query will return object with dependent objects count:

         List<Object[]> result = ObjectSelect.columnQuery(Painting.class,
                 Painting.PAINTING_TITLE,
                 PropertyFactory.createSelf(Painting.TO_ARTIST.getExpression(), Painting.class))
             .select(context);

    Type Parameters:
      `T` - type of represented entity
    Parameters:
      `expression` - expression to be used for this property (usually it will be path from other property)
      `type` - of represented entity
    Returns:
      new 'self' property

  - ### createList

    public static <T extends Persistent> ListProperty<T> createList(CayennePath path, Expression expression, Class<T> entityType)
    Create to-many relationship mapped on list property
    Type Parameters:
      `T` - type of represented relationship entity
    Parameters:
      `path` - of the property
      `expression` - that property will use
      `entityType` - type of represented relationship entity
    Returns:
      new property with custom expression
    Since:
      5.0

  - ### createList

    public static <T extends Persistent> ListProperty<T> createList(String name, Expression expression, Class<T> entityType)
    Create to-many relationship mapped on list property
    Type Parameters:
      `T` - type of represented relationship entity
    Parameters:
      `name` - of the property
      `expression` - that property will use
      `entityType` - type of represented relationship entity
    Returns:
      new property with custom expression

  - ### createList

    public static <T extends Persistent> ListProperty<T> createList(CayennePath path, Class<T> entityType)
    Create to-many relationship mapped on list property
    Type Parameters:
      `T` - type of represented relationship entity
    Parameters:
      `path` - of the property, will be used as value for path expression
      `entityType` - type of represented relationship entity
    Returns:
      new path property
    Since:
      5.0

  - ### createList

    public static <T extends Persistent> ListProperty<T> createList(String name, Class<T> entityType)
    Create to-many relationship mapped on list property
    Type Parameters:
      `T` - type of represented relationship entity
    Parameters:
      `name` - of the property, will be used as value for path expression
      `entityType` - type of represented relationship entity
    Returns:
      new path property

  - ### createSet

    public static <T extends Persistent> SetProperty<T> createSet(CayennePath path, Expression expression, Class<T> entityType)
    Create to-many relationship mapped on set property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `path` - of the property
      `expression` - that property will use
      `entityType` - type of represented attribute
    Returns:
      new property with custom expression
    Since:
      5.0

  - ### createSet

    public static <T extends Persistent> SetProperty<T> createSet(String name, Expression expression, Class<T> entityType)
    Create to-many relationship mapped on set property
    Type Parameters:
      `T` - type of represented attribute
    Parameters:
      `name` - of the property
      `expression` - that property will use
      `entityType` - type of represented attribute
    Returns:
      new property with custom expression

  - ### createSet

    public static <T extends Persistent> SetProperty<T> createSet(CayennePath path, Class<T> entityType)
    Create to-many relationship mapped on set property
    Type Parameters:
      `T` - type of represented relationship entity
    Parameters:
      `path` - of the property, will be used as value for path expression
      `entityType` - type of represented relationship entity
    Returns:
      new path property
    Since:
      5.0

  - ### createSet

    public static <T extends Persistent> SetProperty<T> createSet(String name, Class<T> entityType)
    Create to-many relationship mapped on set property
    Type Parameters:
      `T` - type of represented relationship entity
    Parameters:
      `name` - of the property, will be used as value for path expression
      `entityType` - type of represented relationship entity
    Returns:
      new path property

  - ### createMap

    public static <K, V extends Persistent> MapProperty<K,V> createMap(CayennePath path, Expression expression, Class<K> keyType, Class<V> entityType)
    Create to-many relationship mapped on map property
    Type Parameters:
      `K` - type of represented relationship keys
      `V` - type of represented relationship values
    Parameters:
      `path` - of the property
      `expression` - that property will use
      `keyType` - type of represented relationship keys
      `entityType` - type of represented relationship values
    Returns:
      new property with custom expression
    Since:
      5.0

  - ### createMap

    public static <K, V extends Persistent> MapProperty<K,V> createMap(String name, Expression expression, Class<K> keyType, Class<V> entityType)
    Create to-many relationship mapped on map property
    Type Parameters:
      `K` - type of represented relationship keys
      `V` - type of represented relationship values
    Parameters:
      `name` - of the property
      `expression` - that property will use
      `keyType` - type of represented relationship keys
      `entityType` - type of represented relationship values
    Returns:
      new property with custom expression

  - ### createMap

    public static <K, V extends Persistent> MapProperty<K,V> createMap(CayennePath path, Class<K> keyType, Class<V> entityType)
    Create to-many relationship mapped on map property
    Type Parameters:
      `K` - type of represented relationship keys
      `V` - type of represented relationship values
    Parameters:
      `path` - of the property, will be used as value for path expression
      `keyType` - type of represented relationship keys
      `entityType` - type of represented relationship values
    Returns:
      new path property
    Since:
      5.0

  - ### createMap

    public static <K, V extends Persistent> MapProperty<K,V> createMap(String name, Class<K> keyType, Class<V> entityType)
    Create to-many relationship mapped on map property
    Type Parameters:
      `K` - type of represented relationship keys
      `V` - type of represented relationship values
    Parameters:
      `name` - of the property, will be used as value for path expression
      `keyType` - type of represented relationship keys
      `entityType` - type of represented relationship values
    Returns:
      new path property

  - ### createEmbeddable

    public static <T extends EmbeddableObject> EmbeddableProperty<T> createEmbeddable(CayennePath path, Expression exp, Class<T> embeddableType)
    Create property that represents embeddable
    Type Parameters:
      `T` - type of represented embeddable entity
    Parameters:
      `path` - of the property, will be used as value for path expression
      `exp` - that property will use
      `embeddableType` - type of represented embeddable entity
    Returns:
      new path property
    Since:
      5.0

  - ### createEmbeddable

    public static <T extends EmbeddableObject> EmbeddableProperty<T> createEmbeddable(String name, Expression exp, Class<T> embeddableType)
    Create property that represents embeddable
    Type Parameters:
      `T` - type of represented embeddable entity
    Parameters:
      `name` - of the property, will be used as value for path expression
      `exp` - that property will use
      `embeddableType` - type of represented embeddable entity
    Returns:
      new path property

  - ### createEmbeddable

    public static <T extends EmbeddableObject> EmbeddableProperty<T> createEmbeddable(CayennePath path, Class<T> embeddableType)
    Create property that represents embeddable
    Type Parameters:
      `T` - type of represented embeddable entity
    Parameters:
      `path` - of the property, will be used as value for path expression
      `embeddableType` - type of represented embeddable entity
    Returns:
      new path property
    Since:
      5.0

  - ### createEmbeddable

    public static <T extends EmbeddableObject> EmbeddableProperty<T> createEmbeddable(String name, Class<T> embeddableType)
    Create property that represents embeddable
    Type Parameters:
      `T` - type of represented embeddable entity
    Parameters:
      `name` - of the property, will be used as value for path expression
      `embeddableType` - type of represented embeddable entity
    Returns:
      new path property

  - ### createBaseId

    public static <T> BaseIdProperty<T> createBaseId(String attribute, CayennePath path, String entityName, Class<T> propertyType)
    Create property that represents base ID
    Type Parameters:
      `T` - type of the represented id
    Parameters:
      `attribute` - PK attribute name
      `path` - path of the property
      `entityName` - entity name
      `propertyType` - type of the property
    Returns:
      new id property
    Since:
      5.0

  - ### createBaseId

    public static <T> BaseIdProperty<T> createBaseId(String attribute, String path, String entityName, Class<T> propertyType)

  - ### createBaseId

    public static <T> BaseIdProperty<T> createBaseId(String attribute, String entityName, Class<T> propertyType)

  - ### createNumericId

    public static <T extends Number> NumericIdProperty<T> createNumericId(String attribute, CayennePath path, String entityName, Class<T> propertyType)

  - ### createNumericId

    public static <T extends Number> NumericIdProperty<T> createNumericId(String attribute, String entityName, Class<T> propertyType)

  - ### createNumericId

    public static <T extends Number> NumericIdProperty<T> createNumericId(String attribute, String path, String entityName, Class<T> propertyType)