@@ -204,16 +204,8 @@ public Table registerTable (String n, Session s, List<SQLColumn> cols, java.lang
204204 final Class proxy = cols ==null &&flds ==null ?ppf .register (n ):flds ==null ?rpf .register (cols ,n ,ixflag ):ipf .register (flds ,n ,pt .getName ());
205205 final String sname = proxy ==null ?null :proxy .getName ();
206206
207- w = (Table )t .newInstance (new Object []{n , proxy ==null ?new String ("x" ):proxy });
208- // w.setName(n);
209- w .setFrameSize (Instance .getInstance ().getFrameSize ());
210- // w.setFileStart(cols==null?dataf:tmpdf);
211- // w.setFileLast(cols==null?dataf:tmpdf);
212- w .setParentId (pt ==null ?0 :pt .getObjectId ());
213- s .persist (w ); //ident
214-
215207 boolean setlbs = true ;
216-
208+ int framesize = Instance . getInstance (). getFrameSize ();
217209 DataFile [] datafs = Storage .getStorage ().getInitDataFiles ();
218210
219211 if (cols !=null ) {
@@ -222,9 +214,15 @@ public Table registerTable (String n, Session s, List<SQLColumn> cols, java.lang
222214
223215 if (flds !=null &&pt !=null ) {
224216 datafs = Storage .getStorage ().getIndexFiles ();
217+ framesize = Instance .getInstance ().getFrameSize2 ();
225218 setlbs = false ;
226219 }
227220
221+ w = (Table )t .newInstance (new Object []{n , proxy ==null ?new String ("x" ):proxy });
222+ w .setFrameSize (framesize );
223+ w .setParentId (pt ==null ?0 :pt .getObjectId ());
224+ s .persist (w ); //ident
225+
228226 final LLT llt = LLT .getLLT ();
229227
230228 for (DataFile df : datafs ) {
@@ -344,15 +342,16 @@ public void run() {
344342 }
345343
346344 @ Deprecated
347- public Object nfind (Class c , long id ) throws InternalException , NoSuchMethodException , InvocationTargetException , IOException , InvalidFrameHeader , InvalidFrame , EmptyFrameHeaderFound , IncorrectUndoChunkFound , ClassNotFoundException , InstantiationException , IllegalAccessException {
345+ public Object nfind (Class c , long id )
346+ throws InternalException , NoSuchMethodException , InvocationTargetException , IOException , InterruptedException , ClassNotFoundException , InstantiationException , IllegalAccessException {
348347 final Table t = Instance .getInstance ().getTableByName (c .getName ());
349348 if (t != null ) {
350349 return t .getChunkById (id , this ).getEntity ();
351350 }
352351 return null ;
353352 }
354353
355- public void lock (Object o ) throws Exception , InterruptedException , InvocationTargetException , NoSuchMethodException , InternalException , InvalidFrame , EmptyFrameHeaderFound , IncorrectUndoChunkFound , ClassNotFoundException , InstantiationException , IllegalAccessException , InvalidParameter , CannotAccessToDeletedRecord , CannotAccessToLockedRecord , NotEnoughFrameSpace {
354+ public void lock (Object o ) throws Exception {
356355 ((EntityContainer )o ).getDataChunk ().lock (this , null );
357356 }
358357
@@ -382,7 +381,15 @@ public ResultSet execute(String sql) throws Exception {
382381 public void delete (Object o , LLT llt ) throws Exception {
383382 final Table t = Instance .getInstance ().getTableByName (o .getClass ().getName ());
384383 if (t != null ) {
385- t .delete (o , this , llt );
384+ t .delete (o , this , llt , false );
385+ }
386+ o = null ;
387+ }
388+
389+ public void purge (Object o , LLT llt ) throws Exception {
390+ final Table t = Instance .getInstance ().getTableByName (o .getClass ().getName ());
391+ if (t != null ) {
392+ t .delete (o , this , llt , true );
386393 }
387394 o = null ;
388395 }
0 commit comments