@Immutable public class PropertyTypeUtil extends Object
JCR property types
and ModeShape
property types
.Constructor and Description |
---|
PropertyTypeUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
jcrPropertyTypeFor(Property property)
Compute the JCR
PropertyType for the given ModeShape PropertyType . |
static int |
jcrPropertyTypeFor(PropertyType dnaPropertyType)
Compute the ModeShape
PropertyType for the given JCR PropertyType value. |
static PropertyType |
modePropertyTypeFor(int jcrPropertyType)
Compute the ModeShape
PropertyType for the given JCR PropertyType value. |
public static final int jcrPropertyTypeFor(Property property)
PropertyType
for the given ModeShape PropertyType
.
See MODE-328 for complete discussion on why this method works the way it does. The best option appears to be basing the PropertyType on the first value, since that should be compatible with the PropertyType that was used when the values were set on the property in the first place.
property
- the ModeShape property for which the PropertyType
is to be determined; never nullPropertyType.UNDEFINED
.public static final PropertyType modePropertyTypeFor(int jcrPropertyType)
PropertyType
for the given JCR PropertyType
value.jcrPropertyType
- the JCR property type for which the ModeShape PropertyType
is to be determined;
never nullPropertyType.UNDEFINED
.public static final int jcrPropertyTypeFor(PropertyType dnaPropertyType)
PropertyType
for the given JCR PropertyType
value.dnaPropertyType
- the ModeShape property type; never nullPropertyType.UNDEFINED
.Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.