1 21 22 package org.apache.derby.impl.store.access; 23 24 import java.util.Properties ; 25 import org.apache.derby.iapi.services.cache.Cacheable; 26 import org.apache.derby.iapi.services.cache.CacheManager; 27 import org.apache.derby.iapi.services.sanity.SanityManager; 28 import org.apache.derby.iapi.error.StandardException; 29 import org.apache.derby.iapi.store.access.conglomerate.Conglomerate; 30 31 46 47 class CacheableConglomerate implements Cacheable 48 { 49 private Long conglomid; 50 private Conglomerate conglom; 51 52 53 CacheableConglomerate() 54 { 55 } 56 57 60 protected Conglomerate getConglom() 61 { 62 return(this.conglom); 63 } 64 65 68 69 95 public Cacheable setIdentity(Object key) throws StandardException 96 { 97 if (SanityManager.DEBUG) { 98 SanityManager.THROWASSERT("not supported."); 99 } 100 101 return(null); 102 } 103 104 133 public Cacheable createIdentity(Object key, Object createParameter) 134 throws StandardException 135 { 136 if (SanityManager.DEBUG) 137 { 138 SanityManager.ASSERT( 139 key instanceof Long , "key is not instanceof Long"); 140 SanityManager.ASSERT( 141 createParameter instanceof Conglomerate, 142 "createParameter is not instanceof Conglomerate"); 143 } 144 145 this.conglomid = (Long ) key; 146 this.conglom = ((Conglomerate) createParameter); 147 148 return(this); 149 } 150 151 158 public void clearIdentity() 159 { 160 this.conglomid = null; 161 this.conglom = null; 162 } 163 164 170 public Object getIdentity() 171 { 172 return(this.conglomid); 173 } 174 175 176 182 public boolean isDirty() 183 { 184 return(false); 185 } 186 187 207 public void clean(boolean forRemove) throws StandardException 208 { 209 } 210 } 211 | Popular Tags |