Package oracle.toplink.essentials.sessions

Examples of oracle.toplink.essentials.sessions.Session


  * second argument is not a valid type for that entity's primaryKey
  */
  public Object find(String entityName, Object primaryKey){
        try {
            verifyOpen();
            Session session = getActiveSession();
            ClassDescriptor descriptor = session.getDescriptorForAlias(entityName);
            if (descriptor == null || descriptor.isAggregateDescriptor() || descriptor.isAggregateCollectionDescriptor()){
                throw new IllegalArgumentException(ExceptionLocalization.buildMessage("unknown_entitybean_name", new Object[] {entityName}));
            }
            if (primaryKey == null){ //gf721 - check for null PK
                throw new IllegalArgumentException(ExceptionLocalization.buildMessage("null_pk"));
View Full Code Here


  * @throws IllegalArgumentException if the first argument does
  * not denote an entity type or the second argument is not a valid type for that
  * entity's primary key
  */
  protected Object findInternal(Class entityClass, Object primaryKey) {
      Session session = getActiveSession();
      ClassDescriptor descriptor = session.getDescriptor(entityClass);
      if (descriptor == null || descriptor.isAggregateDescriptor() || descriptor.isAggregateCollectionDescriptor()){
          throw new IllegalArgumentException(ExceptionLocalization.buildMessage("unknown_bean_class", new Object[]{ entityClass}));
      }
      if (primaryKey == null){ //gf721 - check for null PK
        throw new IllegalArgumentException(ExceptionLocalization.buildMessage("null_pk"));
View Full Code Here

TOP

Related Classes of oracle.toplink.essentials.sessions.Session

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.