now implement StorableObject and are used by ObjectStore cache
[mir.git] / source / mircoders / entity / EntityUsers.java
1 package mircoders.entity;
2
3 import  java.util.*;
4
5 import  mir.entity.*;
6 import  mir.storage.*;
7 import  mir.storage.store.*;
8
9 /**
10  * This class is objectmapping of database webdb_users
11  *
12  * @author RK
13  * @version 11.11.2000
14  */
15
16
17 public class EntityUsers extends Entity implements StorableObject
18 {
19
20                 public EntityUsers()
21                 {
22                         super();
23                 }
24
25                 public EntityUsers(StorageObject theStorage) {
26                         this();
27                         setStorage(theStorage);
28                 }
29
30         // Methods
31
32         public boolean isAdmin()
33         {
34                 String admin=getValue("is_admin");
35                 //theLog.printDebugInfo("admin::::"+admin);
36                 return (admin!=null&&admin.equals("1"))?true:false;
37         }
38
39     /**
40    *  Method:       getStoreIdentifier
41    *  Description:  returns unique StoreIdentifer under which the Entity
42    *                is Stored. Based upon primary key and tablename.
43    *
44    *  @return       StoreIdentifier
45    */
46   public StoreIdentifier getStoreIdentifier() {
47     String id = getId();
48     if ( id!=null && theStorageObject!= null )
49      return new StoreIdentifier(this, id+"@"+theStorageObject.getTableName());
50     return null;
51   }
52
53   /**
54    *  Method:       getNotifyOnReleaseSet()
55    *  Description:  returns empty Set, GenericContainer does not implement
56    *                dependencies.
57    *
58    *  @return       null
59    */
60   public Set getNotifyOnReleaseSet() { return null; }
61
62 }