1 9 package org.ozoneDB; 10 11 import org.ozoneDB.tools.OPP.OPP; 12 13 17 abstract class AbstractDatabase extends Object implements OzoneInterface { 18 19 public final static int DefaultAccessRight = Public; 20 21 public OzoneProxy createObject( String className ) throws RuntimeException , OzoneRemoteException { 22 return createObject( className, DefaultAccessRight, null, null, null ); 23 } 24 25 public OzoneProxy createObject( String className, int access ) throws RuntimeException , OzoneRemoteException { 26 return createObject( className, access, null, null, null ); 27 } 28 29 public OzoneProxy createObject( String className, int access, String objName ) throws RuntimeException , OzoneRemoteException { 30 return createObject( className, access, objName, null, null ); 31 } 32 33 public OzoneProxy createObject( String className, String sig, Object [] args ) throws RuntimeException , OzoneRemoteException { 34 return createObject(className,DefaultAccessRight,null,sig,args); 35 } 36 37 public OzoneProxy createObject(Class type) throws RuntimeException , OzoneRemoteException { 38 return createObject(type.getName()); 39 } 40 41 public OzoneProxy createObject(Class type, int access ) throws RuntimeException , OzoneRemoteException { 42 return createObject(type.getName(), access); 43 } 44 45 public OzoneProxy createObject(Class type, int access, String objName ) throws RuntimeException , OzoneRemoteException { 46 return createObject(type.getName(), access, objName); 47 } 48 49 public OzoneProxy createObject(Class type, int access, String objName, Class [] sig, Object [] args) throws RuntimeException , OzoneRemoteException { 50 return createObject(type.getName(),access,objName, createSignature(sig),args); 51 } 52 53 public OzoneProxy createObject(Class type, Class [] sig, Object [] args ) throws RuntimeException , OzoneRemoteException { 54 return createObject(type.getName(), createSignature(sig),args); 55 } 56 57 protected String createSignature(Class [] sig) { 58 if (sig == null || sig.length == 0) { 59 return null; 60 } 61 String signature = sig[0].getName(); 62 for (int i = 1; i < sig.length; i++) { 63 signature = signature + OPP.SIGNATURE_DELIMITER + sig[i].getName(); 64 } 65 return signature; 66 } 67 } | Popular Tags |