1 25 package org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger; 26 27 import java.text.MessageFormat ; 28 29 import javax.persistence.DiscriminatorValue; 30 import javax.persistence.Entity; 31 import javax.persistence.EnumType; 32 import javax.persistence.Enumerated; 33 import javax.persistence.Table; 34 35 40 @Entity 41 @Table(name = "OPERATIONLOGGER") 42 @DiscriminatorValue("operation") 43 public class OperationLogger extends CallbackLogger { 44 45 48 private static final long serialVersionUID = 6121867108408882235L; 49 50 53 private OperationType opType; 54 55 58 private String opDescription; 59 60 64 @Enumerated(EnumType.STRING) 65 public OperationType getOperationType() { 66 return opType; 67 } 68 69 73 public void setOperationType(final OperationType operationType) { 74 this.opType = operationType; 75 } 76 77 81 public String getDescription() { 82 return opDescription; 83 } 84 85 89 public void setDescription(final String description) { 90 this.opDescription = description; 91 } 92 93 97 @SuppressWarnings ("boxing") 98 @Override 99 public String toString() { 100 return MessageFormat.format("{0}, ID = {1}, ClassName = {2}, CallbackClassName = {3}, CallbackEvent = {4}, " 101 + "OperationType = {5}, Description = {6}, Date = {7}", OperationLogger.class.getName(), getId(), 102 getClassName(), getCallbackClassName(), getCallbackEvent(), getOperationType(), getDescription(), 103 getInsertionDate()); 104 } 105 106 } 107 | Popular Tags |