play.db.ebean
Class Model

java.lang.Object
  extended by play.db.ebean.Model

@MappedSuperclass
public class Model
extends java.lang.Object

Base-class for Ebean-mapped models that provides convenience methods.


Nested Class Summary
static class Model.Finder<I,T>
          Helper for Ebean queries.
 
Constructor Summary
Model()
           
 
Method Summary
 void delete()
          Deletes this entity.
 void delete(java.lang.String server)
          Deletes this entity, using a specific Ebean server.
 boolean equals(java.lang.Object other)
           
 int hashCode()
           
 void refresh()
          Refreshes this entity from the database.
 void refresh(java.lang.String server)
          Refreshes this entity from the database, using a specific Ebean server.
 void save()
          Saves (inserts) this entity.
 void save(java.lang.String server)
          Saves (inserts) this entity.
 void saveManyToManyAssociations(java.lang.String path)
          Persist a many-to-many association.
 void saveManyToManyAssociations(java.lang.String server, java.lang.String path)
          Persist a many-to-many association.
 void update()
          Updates this entity.
 void update(java.lang.Object id)
          Updates this entity, by specifying the entity ID.
 void update(java.lang.Object id, java.lang.String server)
          Updates this entity, by specifying the entity ID, using a specific Ebean server.
 void update(java.lang.String server)
          Updates this entity, using a specific Ebean server.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Model

public Model()
Method Detail

save

public void save()
Saves (inserts) this entity.


save

public void save(java.lang.String server)
Saves (inserts) this entity.

Parameters:
server - the Ebean server to use

saveManyToManyAssociations

public void saveManyToManyAssociations(java.lang.String path)
Persist a many-to-many association.


saveManyToManyAssociations

public void saveManyToManyAssociations(java.lang.String server,
                                       java.lang.String path)
Persist a many-to-many association.

Parameters:
server - the Ebean server to use

update

public void update()
Updates this entity.


update

public void update(java.lang.String server)
Updates this entity, using a specific Ebean server.

Parameters:
server - the Ebean server to use

update

public void update(java.lang.Object id)
Updates this entity, by specifying the entity ID.


update

public void update(java.lang.Object id,
                   java.lang.String server)
Updates this entity, by specifying the entity ID, using a specific Ebean server.

Parameters:
server - the Ebean server to use

delete

public void delete()
Deletes this entity.


delete

public void delete(java.lang.String server)
Deletes this entity, using a specific Ebean server.

Parameters:
server - the Ebean server to use

refresh

public void refresh()
Refreshes this entity from the database.


refresh

public void refresh(java.lang.String server)
Refreshes this entity from the database, using a specific Ebean server.

Parameters:
server - the Ebean server to use

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object