Package javax.ejb

Examples of javax.ejb.DuplicateKeyException


/*     */       }
/*     */       catch (SQLException e)
/*     */       {
/* 131 */         if ("23000".equals(e.getSQLState()))
/*     */         {
/* 133 */           throw new DuplicateKeyException("Unique key violation or invalid foreign key value: pk=" + ctx.getId());
/*     */         }
/*     */
/* 137 */         throw new CreateException("Failed to create instance: pk=" + ctx.getId() + ", state=" + e.getSQLState() + ", msg=" + e.getMessage());
/*     */       }
/*     */
View Full Code Here


/*    */       }
/*    */       catch (SQLException e)
/*    */       {
/* 71 */         if ("23000".equals(e.getSQLState()))
/*    */         {
/* 73 */           throw new DuplicateKeyException("Unique key violation or invalid foreign key value: pk=" + ctx.getId());
/*    */         }
/*    */
/* 77 */         throw new CreateException("Failed to create instance: pk=" + ctx.getId() + ", state=" + e.getSQLState() + ", msg=" + e.getMessage());
/*    */       }
/*    */
View Full Code Here

/*     */     try
/*     */     {
/* 348 */       Object id = this.idField.get(ctx.getInstance());
/*     */
/* 351 */       if (getFile(id).exists()) {
/* 352 */         throw new DuplicateKeyException("Already exists: " + id);
/*     */       }
/*     */
/* 355 */       storeEntity(id, ctx.getInstance());
/*     */
/* 357 */       return id;
View Full Code Here

/*     */     try
/*     */     {
/* 243 */       Object id = this.idField.get(ctx.getInstance());
/*     */
/* 246 */       if (this.beans.containsKey(id)) {
/* 247 */         throw new DuplicateKeyException("Already exists: " + id);
/*     */       }
/*     */
/* 250 */       storeEntity(id, ctx.getInstance());
/*     */
/* 252 */       return id;
View Full Code Here

TOP

Related Classes of javax.ejb.DuplicateKeyException

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.