1 29 30 package com.caucho.amber.entity; 31 32 import com.caucho.amber.manager.AmberConnection; 33 34 import java.util.Map ; 35 36 39 abstract public class EntityItem { 40 41 private int _numberOfLoadingColumns; 42 43 abstract public Entity getEntity(); 44 45 public int getNumberOfLoadingColumns() 46 { 47 return _numberOfLoadingColumns; 48 } 49 50 public void setNumberOfLoadingColumns(int number) 51 { 52 _numberOfLoadingColumns = number; 53 } 54 55 public Entity loadEntity(int index) 56 { 57 return getEntity(); 58 } 59 60 public Entity loadEntity(int index, 61 Map preloadedProperties) 62 { 63 return getEntity(); 64 } 65 66 abstract public void save(Entity item); 67 68 abstract public void savePart(Entity item); 69 70 abstract public void expire(); 71 72 abstract public Entity copy(AmberConnection aConn); 73 74 public Entity load(AmberConnection aConn) 75 { 76 return aConn.getEntity(this); 77 } 78 79 abstract Class getInstanceClass(); 80 } 81 | Popular Tags |