Can I implement class using variables like:
String classname = "VarClass";
String type1 = "int";
String name1 = "id";
String type2 = "char";
String typesize2 = "(5)"
String name2= "name"
public class classname{
type1 name1;
type2 name2;
}
I am implementing sort of dynamic class with Base API in BDB je & java.util
Whenever "create table tbname(attname1 atttype1, attname2 atttype2, ...)" command comes in,
Define different class that returns proper object
Is this possible?
Or can anyone help me with this : -Guide to Berkeley DB for SQL Developers(https://www.oracle.com/technetwork/articles/seltzer-berkeleydb-sql-086752.html) says that
CREATE TABLE employee
(primary key empid int(8), last_name varchar(20), first_name varchar(15),
salary numeric(10, 2) salary, street varchar (20), city varchar (15),
state char(2), zip int(5))
turn into this key and data object
typedef int emp_key;
typedef struct _emp_data {
char lname[20];
char fname[15];
float salary;
char street[20];
char city[15];
char state[2];
int zip;
} emp_data;
//This is implemented in C/C++ language
But when there are multiple create commands that each defines different table with different attributes and different number of attribute what should I do?
Is there any way to program this