@SuppressWarnings("unchecked") public <T>T newModel(Class<T> type,Object key,EntityConstraint constraints){
  EntityType entityType=definitions.getEntityTypeMatchingInterface(type.getName(),true);
  Entity entity=newEntity(entityType,key,constraints);
  return (T)getProxy(entity);
}

@ SuppressWarnings ( "unchecked" ) public < T > T newModel ( Class < T > type , Object key , EntityConstraint constraints ) { EntityType entityType = definitions . getEntityTypeMatchingInterface ( type . getName ( ) , true ) ; Entity entity = newEntity ( entityType , key , constraints ) ; return ( T ) getProxy ( entity ) ; }
creates a new entity of the given type with the given key and constraints
