1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2026-01-27 13:12:47 +00:00

Change-Id: I0cca627373c68d94025647f802a7fa6b419e0aad

This commit is contained in:
rogiel
2011-04-30 01:51:36 -03:00
parent f1d8e6588f
commit f454e3c35a
74 changed files with 2744 additions and 255 deletions

View File

@@ -1,16 +1,46 @@
package com.l2jserver.db.dao;
import java.util.List;
import com.l2jserver.model.id.CharacterID;
import com.l2jserver.model.id.ID;
import com.l2jserver.model.world.L2Character;
import com.l2jserver.model.world.Player;
import com.l2jserver.service.cache.Cacheable;
import com.l2jserver.service.cache.IgnoreCaching;
import com.l2jserver.service.database.DataAccessObject;
/**
* The {@link CharacterDAO} is can load and save {@link Player player instances}.
* The {@link CharacterDAO} is can load and save {@link Character character
* instances} .
*
* @author Rogiel
*/
public interface CharacterDAO extends DataAccessObject {
public interface CharacterDAO extends DataAccessObject<L2Character>, Cacheable {
/**
* Load the instance represented by <tt>id</tt> from the database
*
* @param id
* the id
*/
L2Character load(CharacterID id);
void save(L2Character character);
/**
* Loads an List of all {@link ID}s in the database
*
* @return the list containing all ids
*/
@IgnoreCaching
List<CharacterID> listIDs();
/**
* Save the instance to the database. If a new database entry was created
* returns true.
*
* @param id
* the id
* @return true if created a new entry in database (i.e. insert), false if
* not created (i.e. update)
*/
@IgnoreCaching
boolean save(L2Character character);
}

View File

@@ -0,0 +1,45 @@
package com.l2jserver.db.dao;
import java.util.List;
import com.l2jserver.model.id.ClanID;
import com.l2jserver.model.id.ID;
import com.l2jserver.model.world.Clan;
import com.l2jserver.service.cache.Cacheable;
import com.l2jserver.service.cache.IgnoreCaching;
import com.l2jserver.service.database.DataAccessObject;
/**
* The {@link ClanDAO} is can load and save {@link Clan clan instances}.
*
* @author Rogiel
*/
public interface ClanDAO extends DataAccessObject<Clan>, Cacheable {
/**
* Load the instance represented by <tt>id</tt> from the database
*
* @param id
* the id
*/
Clan load(ClanID id);
/**
* Loads an List of all {@link ID}s in the database
*
* @return the list containing all ids
*/
@IgnoreCaching
List<ClanID> listIDs();
/**
* Save the instance to the database. If a new database entry was created
* returns true.
*
* @param id
* the id
* @return true if created a new entry in database (i.e. insert), false if
* not created (i.e. update)
*/
@IgnoreCaching
boolean save(Clan character);
}

View File

@@ -0,0 +1,56 @@
package com.l2jserver.db.dao;
import java.util.List;
import com.l2jserver.model.id.ID;
import com.l2jserver.model.id.ItemID;
import com.l2jserver.model.world.Item;
import com.l2jserver.model.world.L2Character;
import com.l2jserver.service.cache.Cacheable;
import com.l2jserver.service.cache.IgnoreCaching;
import com.l2jserver.service.database.DataAccessObject;
/**
* The {@link ItemDAO} is can load and save {@link Character character
* instances} .
*
* @author Rogiel
*/
public interface ItemDAO extends DataAccessObject<Item>, Cacheable {
/**
* Load the instance represented by <tt>id</tt> from the database
*
* @param id
* the id
*/
Item load(ItemID id);
/**
* Load the inventory for an {@link L2Character character}.
*
* @param character
* the character
* @return amount of items loaded
*/
int loadInventory(L2Character character);
/**
* Loads an List of all {@link ID}s in the database
*
* @return the list containing all ids
*/
@IgnoreCaching
List<ItemID> listIDs();
/**
* Save the instance to the database. If a new database entry was created
* returns true.
*
* @param id
* the id
* @return true if created a new entry in database (i.e. insert), false if
* not created (i.e. update)
*/
@IgnoreCaching
boolean save(Item character);
}

View File

@@ -0,0 +1,45 @@
package com.l2jserver.db.dao;
import java.util.List;
import com.l2jserver.model.id.ID;
import com.l2jserver.model.id.PetID;
import com.l2jserver.model.world.Pet;
import com.l2jserver.service.cache.Cacheable;
import com.l2jserver.service.cache.IgnoreCaching;
import com.l2jserver.service.database.DataAccessObject;
/**
* The {@link PetDAO} is can load and save {@link Pet pet instances}.
*
* @author Rogiel
*/
public interface PetDAO extends DataAccessObject<Pet>, Cacheable {
/**
* Load the instance represented by <tt>id</tt> from the database
*
* @param id
* the id
*/
Pet load(PetID id);
/**
* Loads an List of all {@link ID}s in the database
*
* @return the list containing all ids
*/
@IgnoreCaching
List<PetID> listIDs();
/**
* Save the instance to the database. If a new database entry was created
* returns true.
*
* @param id
* the id
* @return true if created a new entry in database (i.e. insert), false if
* not created (i.e. update)
*/
@IgnoreCaching
boolean save(Pet character);
}