日期:2014-05-19 浏览次数:20727 次
private static EntityKey getOptionalObjectKey(QueryParameters queryParameters, SessionImplementor session) { Object optionalObject = queryParameters.getOptionalObject(); Serializable optionalId = queryParameters.getOptionalId(); String optionalEntityName = queryParameters.getOptionalEntityName(); if(optionalObject != null && optionalEntityName != null) return new EntityKey(optionalId, session.getEntityPersister(optionalEntityName, optionalObject), session.getEntityMode()); else return null; }