EnterpriseElements Logo

Administrative

For users unable to use the Java based interfaces for administering Classes and Users, this page will help you achieve these tasks.

Creating Users

Enterprise Elements Users are managed by entries in the ELEMENT_ATTR_C1 table.  This table is the physical instantiation of the eUser class.  In order to be a valid user of the Elements Repository, the user must be represented in this table.  When a user is added to this table, an Oracle account is created automatically for the user. 

The table continas the following structure:

ELEMENT_ATTR_C1 table
Column Name
Column Type
Description
ELEMENT_ID
NUMBER
The unique identifier of this Element in the local repository.  If you do not specify an ID value, one will be automatically generated on INSERT.  Once assigned, this value can not be modified.
NAME_FIRST
STRING
This is the persons first name
NAME_MIDDLE
STRING
This is the persons middle name
NAME_LAST
STRING
This is the persons last name
EMAIL_ADDRESS
STRING
This email address will be used to send generated email notifications to this user.
DB_USER_ID
NUMBER
This identifier is equivalent to the Oracle UID pseudocolumn.
DB_USER_NAME
STRING
This identifier is equivalent to the Oracle USER pseudocolumn
REQUESTED_PASSWORD
STRING
This will be the initial password given to the newly created Oracle user account.

To create a new user, you would use a command line tool such as SQL*Plus and issue the following command:

INSERT INTO element_attr_c1 ( DB_USER_NAME,
                              NAME_FIRST,
                              NAME_MIDDLE,
                              NAME_LAST,
                              EMAIL_ADDRESS,  
                              REQUESTED_PASSWORD )
VALUES( 'JPUBLIC', 'John', 'Q', 'Public', 'jqp@mydomain.com', 'mypassword' );

COMMIT;

Notice that  ELEMENT_ID and DB_USER_ID values are not specified, as they are automatically generated during the insert.
At this point user JPUBLIC can log in to both Oracle and/or Elements with the password mypassword.

Creating Classes

Classes are managed by data contianed in three tables: CLASS, ATTRIBUTE, and CLASS_ATTRIBUTE.  The class table represents a physical Oracle table with additional metadata.  The ATTRIBUTE table represents physical Oracle columns and additional metadata and the CLASS_ATTRIBTUE table identifies which columns go with which classes, also with additional metadata.
The structure of these tables is as follows:

CLASS table
Column Name
Column Type
Description
CLASS_ID
NUMBER
This is a unique identifier for this particular class in the local repository.
NAME
STRING
This is the name users will call this class
PREFIX
STRING
The prefix will be used to generate default lables for elements within this class
DESCRIPTION
STRING
This is a textual description of the contents of this class.
TYPE_ID
NUMBER
The type of class is limited to the value 14 - meaning 'USER_DEFINED' Other values are reserved for internal use.
COLOR_ID
NUMBER
This is a foreign key reference to the COLOR table.  Any value found in that table is a valid value here. Default = 0 for black.  This is the color that will be used to represent elements in this class in default summary filters and class listings.
SYMBOL_ID
NUMBER
This is a foreign key to the SYMBOL table.  Any valid value in that table is valid here.
PACKAGE_ID
NUMBER
Classes may be placed in to a package hierarchy.  This is a foreign key in to the PACKAGE table. any valid value found in that table is valid here.
ATTRIBUTE table
Column Name
Column Type
Description
ATTRIBUTE_ID
NUMBER
This is a unique identifier for this particular attribute in the local repository.
TYPE_ID
NUMBER
The logical type of column this attribute represents.  Valid values are:
4 = HYPERLINK  
8 = PICK_LIST   
71 = STATE_MACHINE   
112 = SQL_PICK_LIST   
34 = STRING   
17 = NUMBER   
18 = BOOLEAN   
19 = DATE_TIME   
COLUMN_NAME
STRING
This is the physical Oracle column name that will be used when instantiating this attribute into a physical table.  Oracle column name restrictions apply here.
COLUMN_TYPE_ID
NUMBER This identifier represents the physical type of column that should be generated when instantiating this attribute tnto a physical table.  valid values are:
1 = VARCHAR2
2 = NUMBER
3 = DATE
COLUMN_SIZE
NUMBER
.This value indicates the size of varchar2 column.  Max is 4000
STATE_MACHINE_ID
NUMBER
If the type is 71 (STATE MACHINE) then this identifier is a foreign key to the STATE_MACHINE table pointing to the machine to use to populate the values in the elements of this class.
LIST_ID
NUMBER
If the type is 112 (SQL PICK LIST) then this identifier is a foreign key to the named_text table pointing to the filter to use as the SQL source to populate the values in the elements of this class.
CLASS_ATTRIBUTE table
Column Name
Column Type
Description
CLASS_ID
NUMBER
This is a unique identifier for this particular class in the local repository that this attribute should be included in
ATTRIBUTE_ID
NUMBER This is the unique identifier of the attribute that should be included in this class.
DISPLAY_NAME
STRING
This is the label that will be displayed on default editors and filters when referring to this attribute within this class. (note that is does not need to be the same as the physical column name)
TOOL_TIP
STRING
This is a textual information displayed when the user hovers a mouse over the attribute in the default editors
TYPE_ID
NUMBER
The type class_attribute is limited to the value 73 - meaning 'ORIGINAL'.  Other values are reserved for internal use.
POSITION
NUMBER
This ordinal number is used as a sort value to determine the order in which the attributes are displayed to the user by default in various editors and generated filters..
DISPLAY_ROWS
NUMBER
For string type attributes, this value indicates the default number of rows the editors will use to allow the user to view and modify the information.
DEFAULT_VALUE
STRING
This value will be used to populate any element in this class that is inserted with a null in this attribute.

A basic formula for constructing a class would be to issue commands similar to the following: (Note in fully scripted mode this would be contained withon a BEGIN/END block)

SELECT class_id_seq.NEXTVAL FROM dual;

INSERT INTO class ( CLASS_ID,
                    NAME,
                    PREFIX,
                    DESCRIPTION,
                    TYPE_ID,
                    COLOR_ID,
                    SYMBOL_ID)

VALUES ( class_id_seq.CURRVAL, 'My Class', 'MYCLASS', 'MY Example Class Description', 14, 0, 217 );
COMMIT;

INSERT INTO ATTRIBUTE ( ATTRIBUTE_ID,
                        TYPE_ID,
                        COLUMN_NAME,
                        COLUMN_TYPE_ID,
                        COLUMN_SIZE )

VALUES ( ATTRIBUTE_ID_SEQ.NEXTVAL, 34, 'NAME', 1, 4000);
COMMIT;

INSERT INTO CLASS_ATTRIBUTE ( CLASS_ID,
                        ATTRIBUTE_ID,
                        DISPLAY_NAME,
                        TOOL_TIP,
                        POSITION,
                        TYPE_ID,
                        DISPLAY_ROWS )

VALUES (cur_class_id, ATTRIBUTE_ID_SEQ.CURRVAL, 'Name', 'The Name or brief description of this Item', 2, 73, 2);
COMMIT;

Note that you may need to remember the specific ID numbers you generate if you do not script these commands.  For instance, you may need to plug in actual values for class_id_seq.CURRVAL and ATTRIBUTE_ID_SEQ.CURRVAL. In this case, make a mental note of the return values when selected from Dual, and use those.