@ -8,20 +8,22 @@ import org.apache.cayenne.BaseDataObject;
import org.apache.cayenne.exp.Property ;
import org.apache.cayenne.exp.Property ;
/ * *
/ * *
* Class _ User was generated by Cayenne .
* Class _ System User was generated by Cayenne .
* It is probably a good idea to avoid changing this class manually ,
* It is probably a good idea to avoid changing this class manually ,
* since it may be overwritten next time code is regenerated .
* since it may be overwritten next time code is regenerated .
* If you need to make any customizations , please use subclass .
* If you need to make any customizations , please use subclass .
* /
* /
public abstract class _ User extends BaseDataObject {
public abstract class _ System User extends BaseDataObject {
private static final long serialVersionUID = 1L ;
private static final long serialVersionUID = 1L ;
public static final String ID_PK_COLUMN = "id" ;
public static final String ID_PK_COLUMN = "id" ;
public static final Property < String > EMAIL = Property . create ( "email" , String . class ) ;
public static final Property < String > EMAIL = Property . create ( "email" , String . class ) ;
public static final Property < String > PASSWORD = Property . create ( "password" , String . class ) ;
protected String email ;
protected String email ;
protected String password ;
public void setEmail ( String email ) {
public void setEmail ( String email ) {
@ -34,6 +36,16 @@ public abstract class _User extends BaseDataObject {
return this . email ;
return this . email ;
}
}
public void setPassword ( String password ) {
beforePropertyWrite ( "password" , this . password , password ) ;
this . password = password ;
}
public String getPassword ( ) {
beforePropertyRead ( "password" ) ;
return this . password ;
}
@Override
@Override
public Object readPropertyDirectly ( String propName ) {
public Object readPropertyDirectly ( String propName ) {
if ( propName = = null ) {
if ( propName = = null ) {
@ -43,6 +55,8 @@ public abstract class _User extends BaseDataObject {
switch ( propName ) {
switch ( propName ) {
case "email" :
case "email" :
return this . email ;
return this . email ;
case "password" :
return this . password ;
default :
default :
return super . readPropertyDirectly ( propName ) ;
return super . readPropertyDirectly ( propName ) ;
}
}
@ -58,6 +72,9 @@ public abstract class _User extends BaseDataObject {
case "email" :
case "email" :
this . email = ( String ) val ;
this . email = ( String ) val ;
break ;
break ;
case "password" :
this . password = ( String ) val ;
break ;
default :
default :
super . writePropertyDirectly ( propName , val ) ;
super . writePropertyDirectly ( propName , val ) ;
}
}
@ -75,12 +92,14 @@ public abstract class _User extends BaseDataObject {
protected void writeState ( ObjectOutputStream out ) throws IOException {
protected void writeState ( ObjectOutputStream out ) throws IOException {
super . writeState ( out ) ;
super . writeState ( out ) ;
out . writeObject ( this . email ) ;
out . writeObject ( this . email ) ;
out . writeObject ( this . password ) ;
}
}
@Override
@Override
protected void readState ( ObjectInputStream in ) throws IOException , ClassNotFoundException {
protected void readState ( ObjectInputStream in ) throws IOException , ClassNotFoundException {
super . readState ( in ) ;
super . readState ( in ) ;
this . email = ( String ) in . readObject ( ) ;
this . email = ( String ) in . readObject ( ) ;
this . password = ( String ) in . readObject ( ) ;
}
}
}
}