private static <T> T unmarshalBaseEntity(BaseEntity<?> nativeEntity, Class<T> entityClass) {
    if (nativeEntity == null) {
      return null;
    }
    Unmarshaller unmarshaller = new Unmarshaller(nativeEntity, entityClass);
    return unmarshaller.unmarshal();
  }
private static < T > T unmarshalBaseEntity ( BaseEntity < ? > nativeEntity , Class < T > entityClass ) { if ( nativeEntity == null ) { return null ; } Unmarshaller unmarshaller = new Unmarshaller ( nativeEntity , entityClass ) ; return unmarshaller . unmarshal ( ) ; }
Unmarshals the given BaseEntity and returns the equivalent model object.

@param nativeEntity
the native entity to unmarshal
@param entityClass
the target type of the model class
@return the model object