1 13 14 package org.ejbca.core.ejb.authorization; 15 16 import javax.ejb.CreateException ; 17 18 import org.ejbca.core.ejb.BaseEntityBean; 19 20 21 64 public abstract class AuthorizationTreeUpdateDataBean extends BaseEntityBean 65 { 66 public static final Integer AUTHORIZATIONTREEUPDATEDATA = new Integer (1); 67 68 72 public abstract Integer getPrimKey(); 73 public abstract void setPrimKey(Integer primKey); 74 75 83 public abstract int getAuthorizationTreeUpdateNumber(); 84 85 87 public abstract void setAuthorizationTreeUpdateNumber(int authorizationtreeupdatenumber); 88 89 92 public Integer ejbCreate() throws CreateException { 93 setPrimKey(AUTHORIZATIONTREEUPDATEDATA); 94 setAuthorizationTreeUpdateNumber(0); 95 return null; 96 } 97 98 public void ejbPostCreate() { 99 } 101 102 111 public boolean updateNeccessary(int currentauthorizationtreeupdatenumber){ 112 return getAuthorizationTreeUpdateNumber() != currentauthorizationtreeupdatenumber; 113 } 115 116 121 public void incrementAuthorizationTreeUpdateNumber(){ 122 setAuthorizationTreeUpdateNumber(getAuthorizationTreeUpdateNumber() +1); 123 } 125 } 126 | Popular Tags |