Class IdHelper
- java.lang.Object
-
- org.eclipse.persistence.jpa.rs.util.IdHelper
-
public class IdHelper extends Object
EclipseLink helper class used for converting composite key values passed into JAX-RS calls as query or matrix parameters into a value that can be used in a find.- Author:
- dclarke
- Since:
- EclipseLink 2.4.0
-
-
Constructor Summary
Constructors Constructor Description IdHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
buildId(PersistenceContext app, String entityName, String idString)
static Object
buildObjectShell(PersistenceContext context, String entityType, Object id)
build a shell of an object based on a primary key.static List<org.eclipse.persistence.jpa.rs.util.IdHelper.SortableKey>
getPrimaryKey(PersistenceContext context, String entityName)
static String
stringifyId(Object entity, String typeName, PersistenceContext app)
-
-
-
Method Detail
-
buildId
public static Object buildId(PersistenceContext app, String entityName, String idString)
-
stringifyId
public static String stringifyId(Object entity, String typeName, PersistenceContext app)
-
buildObjectShell
public static Object buildObjectShell(PersistenceContext context, String entityType, Object id)
build a shell of an object based on a primary key. The object shell will be an instance of the object with only primary key populated- Parameters:
context
-entityType
-id
-- Returns:
-
getPrimaryKey
public static List<org.eclipse.persistence.jpa.rs.util.IdHelper.SortableKey> getPrimaryKey(PersistenceContext context, String entityName)
-
-