Examples of JDBCEntityCommandMetaData


Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData

      instanceFactory = new InstanceFactory(this, entityBridge);

      startCmd = new JDBCStartCommand(this);
      startCmd.execute();

      final JDBCEntityCommandMetaData entityCommand = getMetaData().getEntityCommand();
      if(entityCommand == null || "default".equals(entityCommand.getCommandName()))
      {
         createCmd = new ApplicationPkCreateCommand();
      }
      else
      {
         final Class cmdClass = entityCommand.getCommandClass();
         if(cmdClass == null)
         {
            throw new DeploymentException(
               "entity-command class name is not specified for entity " + entityBridge.getEntityName()
            );
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData

      {
         throw new DeploymentException("This entity-command cannot be used with composite primary keys!");
      }
      this.pkField = (JDBCCMPFieldBridge2) pkFields[0];

      JDBCEntityCommandMetaData metadata = entityBridge.getMetaData().getEntityCommand();
      pkSql = metadata.getAttribute("pk-sql");
      if(pkSql == null)
      {
         throw new DeploymentException("pk-sql attribute must be set for entity " + entityBridge.getEntityName());
      }
      if(log.isDebugEnabled())
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData

   public void init(JDBCStoreManager2 manager) throws DeploymentException
   {
      super.init(manager);

      JDBCEntityCommandMetaData metadata = entityBridge.getMetaData().getEntityCommand();
      pkSql = metadata.getAttribute("pk-sql");
      if(pkSql == null)
      {
         pkSql = "CALL IDENTITY()";
      }
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData

   public void init(JDBCStoreManager2 manager) throws DeploymentException
   {
      super.init(manager);

      JDBCEntityCommandMetaData metadata = entityBridge.getMetaData().getEntityCommand();
      String sequence = metadata.getAttribute("sequence");
      if (sequence == null) {
         sequence = entityBridge.getQualifiedTableName()
            + '_' + SQLUtil.getColumnNamesClause(pkField, new StringBuffer(20))
            + "_seq";
      }
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData

         }
      }

      initGeneratedFields();

      JDBCEntityCommandMetaData entityCommand = manager.getMetaData().getEntityCommand();
      if(entityCommand == null)
      {
         throw new DeploymentException("entity-command is null");
      }
      initEntityCommand(entityCommand);
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData

/*  94 */       break;
/*     */     }
/*     */
/*  98 */     initGeneratedFields();
/*     */
/* 100 */     JDBCEntityCommandMetaData entityCommand = manager.getMetaData().getEntityCommand();
/* 101 */     if (entityCommand == null)
/*     */     {
/* 103 */       throw new DeploymentException("entity-command is null");
/*     */     }
/* 105 */     initEntityCommand(entityCommand);
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData

/* 456 */     this.instanceFactory = new InstanceFactory(this, this.entityBridge);
/*     */
/* 458 */     this.startCmd = new JDBCStartCommand(this);
/* 459 */     this.startCmd.execute();
/*     */
/* 461 */     JDBCEntityCommandMetaData entityCommand = getMetaData().getEntityCommand();
/* 462 */     if ((entityCommand == null) || ("default".equals(entityCommand.getCommandName())))
/*     */     {
/* 464 */       this.createCmd = new ApplicationPkCreateCommand();
/*     */     }
/*     */     else
/*     */     {
/* 468 */       Class cmdClass = entityCommand.getCommandClass();
/* 469 */       if (cmdClass == null)
/*     */       {
/* 471 */         throw new DeploymentException("entity-command class name is not specified for entity " + this.entityBridge.getEntityName());
/*     */       }
/*     */
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData

/*     */     {
/*  61 */       throw new DeploymentException("This entity-command cannot be used with composite primary keys!");
/*     */     }
/*  63 */     this.pkField = ((JDBCCMPFieldBridge2)pkFields[0]);
/*     */
/*  65 */     JDBCEntityCommandMetaData metadata = this.entityBridge.getMetaData().getEntityCommand();
/*  66 */     this.pkSql = metadata.getAttribute("pk-sql");
/*  67 */     if (this.pkSql == null)
/*     */     {
/*  69 */       throw new DeploymentException("pk-sql attribute must be set for entity " + this.entityBridge.getEntityName());
/*     */     }
/*  71 */     if (this.log.isDebugEnabled())
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData

/*    */   public void init(JDBCStoreManager2 manager)
/*    */     throws DeploymentException
/*    */   {
/* 41 */     super.init(manager);
/*    */
/* 43 */     JDBCEntityCommandMetaData metadata = this.entityBridge.getMetaData().getEntityCommand();
/* 44 */     this.pkSql = metadata.getAttribute("pk-sql");
/* 45 */     if (this.pkSql == null)
/*    */     {
/* 47 */       this.pkSql = "CALL IDENTITY()";
/*    */     }
/*    */
View Full Code Here

Examples of org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData

/*    */   public void init(JDBCStoreManager2 manager)
/*    */     throws DeploymentException
/*    */   {
/* 40 */     super.init(manager);
/*    */
/* 42 */     JDBCEntityCommandMetaData metadata = this.entityBridge.getMetaData().getEntityCommand();
/* 43 */     String sequence = metadata.getAttribute("sequence");
/* 44 */     if (sequence == null) {
/* 45 */       sequence = this.entityBridge.getQualifiedTableName() + '_' + SQLUtil.getColumnNamesClause(this.pkField, new StringBuffer(20)) + "_seq";
/*    */     }
/*    */
/* 50 */     this.pkSql = ("SELECT currval('" + sequence + "')");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.