Class IdHelper


  • public class IdHelper
    extends java.lang.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 java.lang.Object buildId​(PersistenceContext app, java.lang.String entityName, java.lang.String idString)  
      static java.lang.Object buildObjectShell​(PersistenceContext context, java.lang.String entityType, java.lang.Object id)
      build a shell of an object based on a primary key.
      static java.util.List<org.eclipse.persistence.jpa.rs.util.IdHelper.SortableKey> getPrimaryKey​(PersistenceContext context, java.lang.String entityName)  
      static java.lang.String stringifyId​(java.lang.Object entity, java.lang.String typeName, PersistenceContext app)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IdHelper

        public IdHelper()
    • Method Detail

      • buildId

        public static java.lang.Object buildId​(PersistenceContext app,
                                               java.lang.String entityName,
                                               java.lang.String idString)
      • stringifyId

        public static java.lang.String stringifyId​(java.lang.Object entity,
                                                   java.lang.String typeName,
                                                   PersistenceContext app)
      • buildObjectShell

        public static java.lang.Object buildObjectShell​(PersistenceContext context,
                                                        java.lang.String entityType,
                                                        java.lang.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 java.util.List<org.eclipse.persistence.jpa.rs.util.IdHelper.SortableKey> getPrimaryKey​(PersistenceContext context,
                                                                                                             java.lang.String entityName)