1 24 package org.riotfamily.riot.dao.support; 25 26 import java.util.Collection ; 27 import java.util.Collections ; 28 29 import org.riotfamily.riot.dao.ListParams; 30 import org.riotfamily.riot.dao.RiotDao; 31 import org.springframework.dao.DataAccessException; 32 import org.springframework.dao.InvalidDataAccessApiUsageException; 33 34 38 public class RiotDaoAdapter implements RiotDao { 39 40 public Class getEntityClass() { 41 return null; 42 } 43 44 47 public int getListSize(Object parent, ListParams params) 48 throws DataAccessException { 49 50 return -1; 51 } 52 53 56 public String getObjectId(Object entity) { 57 return null; 58 } 59 60 63 public Collection list(Object parent, ListParams params) 64 throws DataAccessException { 65 66 return Collections.EMPTY_LIST; 67 } 68 69 72 public Object load(String id) throws DataAccessException { 73 throw new InvalidDataAccessApiUsageException( 74 "Load operations are not supported by this DAO."); 75 } 76 77 80 public void save(Object entity, Object parent) throws DataAccessException { 81 throw new InvalidDataAccessApiUsageException( 82 "Save operations are not supported by this DAO."); 83 } 84 85 88 public void update(Object entity) throws DataAccessException { 89 throw new InvalidDataAccessApiUsageException( 90 "Update operations are not supported by this DAO."); 91 } 92 93 96 public void delete(Object entity, Object parent) 97 throws DataAccessException { 98 99 throw new InvalidDataAccessApiUsageException( 100 "Delete operations are not supported by this DAO."); 101 } 102 103 } 104 | Popular Tags |