Table SYSTEM_USERS() {

        Table t = sysTables[SYSTEM_USERS];

        if (t == null) {
            t = createBlankTable(sysTableHsqlNames[SYSTEM_USERS]);

            addColumn(t, "USER_NAME", SQL_IDENTIFIER);
            addColumn(t, "ADMIN", Type.SQL_BOOLEAN);
            addColumn(t, "INITIAL_SCHEMA", SQL_IDENTIFIER);

            // order: USER
            // true PK
            HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
                sysTableHsqlNames[SYSTEM_USERS].name, false,
                SchemaObject.INDEX);

            t.createPrimaryKey(name, new int[]{ 0 }, true);

            return t;
        }

        PersistentStore store = database.persistentStoreCollection.getStore(t);

        // Intermediate holders
        HsqlArrayList users;
        User          user;
        Object[]      row;
        HsqlName      initialSchema;

        // Initialization
        users = database.getUserManager().listVisibleUsers(session);

        // Do it.
        for (int i = 0; i < users.size(); i++) {
            row           = t.getEmptyRowData();
            user          = (User) users.get(i);
            initialSchema = user.getInitialSchema();
            row[0]        = user.getNameString();
            row[1]        = ValuePool.getBoolean(user.isAdmin());
            row[2]        = ((initialSchema == null) ? null
                                                     : initialSchema.name);

            t.insertSys(store, row);
        }

        return t;
    }
Table SYSTEM_USERS ( ) { Table t = sysTables [ SYSTEM_USERS ] ; if ( t == null ) { t = createBlankTable ( sysTableHsqlNames [ SYSTEM_USERS ] ) ; addColumn ( t , "USER_NAME" , SQL_IDENTIFIER ) ; addColumn ( t , "ADMIN" , Type . SQL_BOOLEAN ) ; addColumn ( t , "INITIAL_SCHEMA" , SQL_IDENTIFIER ) ; HsqlName name = HsqlNameManager . newInfoSchemaObjectName ( sysTableHsqlNames [ SYSTEM_USERS ] . name , false , SchemaObject . INDEX ) ; t . createPrimaryKey ( name , new int [ ] { 0 } , true ) ; return t ; } PersistentStore store = database . persistentStoreCollection . getStore ( t ) ; HsqlArrayList users ; User user ; Object [ ] row ; HsqlName initialSchema ; users = database . getUserManager ( ) . listVisibleUsers ( session ) ; for ( int i = 0 ; i < users . size ( ) ; i ++ ) { row = t . getEmptyRowData ( ) ; user = ( User ) users . get ( i ) ; initialSchema = user . getInitialSchema ( ) ; row [ 0 ] = user . getNameString ( ) ; row [ 1 ] = ValuePool . getBoolean ( user . isAdmin ( ) ) ; row [ 2 ] = ( ( initialSchema == null ) ? null : initialSchema . name ) ; t . insertSys ( store , row ) ; } return t ; }
Retrieves a <code>Table</code> object describing the
visible <code>Users</code> defined within this database.
@return table containing information about the users defined within
this database