1 4 5 package org.enhydra.shark.instancepersistence; 6 7 8 import org.enhydra.shark.api.internal.instancepersistence.ResourcePersistenceInterface; 9 import org.enhydra.shark.utilities.hibernate.HibernateGeneric; 10 import org.enhydra.shark.utilities.hibernate.HibernateObjectUtil; 11 12 16 public class HibernateResource extends HibernateObjectUtil implements ResourcePersistenceInterface,HibernateGeneric { 17 18 private String username; 19 private String name; 20 21 private int dbId = -1; 22 23 public int getDbId() { 24 return dbId; 25 } 26 27 public void setDbId(int dbId) { 28 this.dbId = dbId; 29 } 30 31 public void setUsername (String un) { 32 this.username=un; 33 } 34 35 public String getUsername () { 36 return username; 37 } 38 39 public void setName (String newName) { 40 name=newName; 41 } 42 43 public String getName () { 44 return name; 45 } 46 47 public String toString(){ 48 StringBuffer strBuffer = new StringBuffer (); 49 strBuffer.append("idDB = " + this.dbId + "\n"); 50 strBuffer.append("username = " + this.getUsername() + "\n"); 51 strBuffer.append("name = " + this.getName() + "\n"); 52 return strBuffer.toString(); 53 54 } 55 56 } | Popular Tags |