Named object type

I want to create a 'Named' type to act as a parent to all classes whose identity is based solely on a "name" (ie, a String), such that no two instances with the same name can be added to a Set.
First question: Is there such an animal in Java already? I'd hate to be reinventing the wheel.
Here's what I've got so far:...
* Class representing an Object with a "name" (a String) and whose indentity is
* based solely on it by default. The name is set at construction time and is final.
* Subclasses may override equals() and hashCode() at the expense of this default
* behaviour.
public class Named
     private final String name;
     private        int   hashcode = -1;
     protected Named(String n) {
          name = n;
     public final String getName()     {
          return name;
     public boolean equals(Object o)     {
          if ( this.getClass() == o.getClass() )
               return name.equals( ((Named)o).name;
          else
               return false;
     public int hashCode()
          if (hashcode == -1)
               hashcode = name.hashCode();
          return hashcode;
     /** protected clone method solely to allow subclasses to implement Cloneable */
     protected Object clone() throws CloneNotSupportedException
          return super.clone();
}Questions:
Is '==' correct for comparing Classes?
Is there a better way to achieve this?

georgemc wrote:
OP, if you can override equals and hashCode, your desire to ensure uniqueness within a Set based on names alone is restricted. Sounds more like you'd want your own implementation of Set for thatSorry for delay in replying folks. Had to go shopping and stopped off at the pub to think about this.
You're absolutetly right george. As puckstopper already pointed out, my thinking wasn't very linear, which is crucial when I'm trying to implement an alternate form of Object.
I've already jettisoned the idea of an overridable type for a simple 'Named' type by making equals() and hashCode() final, and added a few more doc comments about usage.
My problem was that, in my current Project, I had simply oodles of classes that fit into this category, and have since found that they exist in a bunch of other projects I've already writted. Had I but known.
I guess my original question still remains: Am I reinventing the wheel?
Another question for those in the know: should I implement Comparable?
PS: I didn't form my orginal thread as a question, but have no idea how to change it; and I've already had my 15 minutes of fame(?).

Similar Messages

  • Naming Standard - Object Types

    Is there a way to extend the options under 'Naming Standard:' to include object types? As well as object type attributes, attributes that are created when a REF link is created or when an attribute's datatype is another object type. I would like to change the template format that is used when the default names are used when creating these items.
    Thanks,
    ScottK

    Hi Scott,
    we have such request logged.
    Philip

  • Assign value to Object type variable

    CREATE OR REPLACE TYPE emp AS OBJECT (
    empid NUMBER,
    age NUMBER,
    dob date);
    CREATE OR REPLACE TYPE emp _tab AS TABLE OF emp;
    Pls hlep me assign value to the object type variable in loop..(assume there is 5 10 records in emp table)
    declare
    v_emp_tt emp _tab ;
    begin
    for i in (select empid ,age ,dob from emp ) Loop
    v_emp_tt := i.empid; --this is wrong pls help me correct it.
    end loop;
    end;
    thanks,

    I would keep the type/object naming convention distinct from the table name.
    In terms of assignment:
    CREATE OR REPLACE TYPE to_emp AS OBJECT
    (empid NUMBER,
    age NUMBER,
    dob date);
    CREATE OR REPLACE TYPE tt_emp AS TABLE OF emp;
    declare
    v_emp tt_emp;
    begin
    select to_emp_obj(emp_id, age, dob)
    bulk collect into v_emp
    from emp;
    end;

  • Partitioned IOT of Object Type - mapping table not allowed for bitmap index

    Hi,
    looks like a feature available for standard Partitioned IOTs is not supported for object based tables, namely the MAPPING TABLE construct to support secondary local bitmap indexes.
    Can you confirm behaviour is as expected/documented?
    If so, is a fix/enhancement to support mapping table for object-based Partitioned IOTs in the pipeline?
    Results for partition-wise load using pipelined table function are very good, look-ups across tens of millions of rows are excellent.
    Environment = Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    OS = Oracle Enterprise Linux Server release 5.2 (Carthage) 2.6.18 92.el5 (32-bit)
    Here's the potted test-case...
    1) First the non object based Partitioned IOT - data is range-partitioned across the alphabet
    CREATE TABLE IOT_Table (
    textData VARCHAR2(10),
    numberData NUMBER(10,0),
    CONSTRAINT IOT_Table_PK PRIMARY KEY(textData))
    ORGANIZATION INDEX MAPPING TABLE PCTFREE 0 TABLESPACE Firewire
    PARTITION BY RANGE (textData)
    (PARTITION Text_Part_A VALUES LESS THAN ('B') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_B VALUES LESS THAN ('C') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_C VALUES LESS THAN ('D') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_D VALUES LESS THAN ('E') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_E VALUES LESS THAN ('F') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_F VALUES LESS THAN ('G') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_G VALUES LESS THAN ('H') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_H VALUES LESS THAN ('I') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_I VALUES LESS THAN ('J') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_J VALUES LESS THAN ('K') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_K VALUES LESS THAN ('L') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_L VALUES LESS THAN ('M') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_M VALUES LESS THAN ('N') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_N VALUES LESS THAN ('O') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_O VALUES LESS THAN ('P') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_P VALUES LESS THAN ('Q') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Q VALUES LESS THAN ('R') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_R VALUES LESS THAN ('S') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_S VALUES LESS THAN ('T') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_T VALUES LESS THAN ('U') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_U VALUES LESS THAN ('V') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_V VALUES LESS THAN ('W') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_W VALUES LESS THAN ('X') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_X VALUES LESS THAN ('Y') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Y VALUES LESS THAN ('Z') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Z VALUES LESS THAN (MAXVALUE) PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0))
    NOLOGGING PARALLEL -- FLASHBACK ARCHIVE IOT_Flashback_Data
    SQL> table IOT_TABLE created.
    2) Create the local secondary bitmap index utilising the underlying mapping table
    CREATE BITMAP INDEX IOT_Table_BMI1 ON IOT_Table (numberData)
    LOCAL STORAGE (INITIAL 1M PCTINCREASE 0 NEXT 512K) NOLOGGING PARALLEL;
    SQL> bitmap index IOT_TABLE_BMI1 created.
    3) Quick test to confirm all ok
    SQL> INSERT INTO IOT_Table VALUES ('ABC123',100);
    SQL> 1 rows inserted.
    SQL> SELECT * FROM IOT_Table;
    TEXTDATA NUMBERDATA
    ABC123     100
    4) Now create a minimal object type to use as the template for object table
    CREATE TYPE IOT_type AS OBJECT
    textData VARCHAR2(10 CHAR),
    numberData NUMBER(10,0)
    ) FINAL
    SQL> TYPE IOT_type compiled
    5) Attempt to create an object-based range partitioned IOT, including MAPPING TABLE clause as per step (1)
    CREATE TABLE IOTObj_Table OF IOT_type (textData PRIMARY KEY)
    OBJECT IDENTIFIER IS PRIMARY KEY ORGANIZATION INDEX
    MAPPING TABLE -- we'd like to use this feature to enable use of Bitmap Indexes...
    PCTFREE 0 TABLESPACE Firewire
    PARTITION BY RANGE (textData)
    (PARTITION Text_Part_A VALUES LESS THAN ('B') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_B VALUES LESS THAN ('C') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_C VALUES LESS THAN ('D') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_D VALUES LESS THAN ('E') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_E VALUES LESS THAN ('F') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_F VALUES LESS THAN ('G') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_G VALUES LESS THAN ('H') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_H VALUES LESS THAN ('I') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_I VALUES LESS THAN ('J') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_J VALUES LESS THAN ('K') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_K VALUES LESS THAN ('L') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_L VALUES LESS THAN ('M') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_M VALUES LESS THAN ('N') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_N VALUES LESS THAN ('O') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_O VALUES LESS THAN ('P') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_P VALUES LESS THAN ('Q') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Q VALUES LESS THAN ('R') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_R VALUES LESS THAN ('S') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_S VALUES LESS THAN ('T') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_T VALUES LESS THAN ('U') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_U VALUES LESS THAN ('V') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_V VALUES LESS THAN ('W') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_W VALUES LESS THAN ('X') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_X VALUES LESS THAN ('Y') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Y VALUES LESS THAN ('Z') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Z VALUES LESS THAN (MAXVALUE) PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0))
    NOLOGGING PARALLEL -- FLASHBACK ARCHIVE IOT_Flashback_Data
    This errors out with the following...
    SQL Error: ORA-25182: feature not currently available for index-organized tables
    25182. 00000 - "feature not currently available for index-organized tables"
    *Cause:    An attempt was made to use one or more of the following feature(s) not
    currently supported for index-organized tables:
    CREATE TABLE with LOB/BFILE/VARRAY columns,
    partitioning/PARALLEL/CREATE TABLE AS SELECT options,
    ALTER TABLE with ADD/MODIFY column options, CREATE INDEX
    *Action:   Do not use the disallowed feature(s) in this release.
    6) Re-running the create table statement in step 5 without the MAPPING TABLE clause works fine. Not surprisingly an attempt to create a secondary local bitmap index on this table fails as there's no mapping table, like so...
    CREATE BITMAP INDEX IOTObj_Table_BMI1 ON IOTObj_Table (numberData)
    LOCAL STORAGE (INITIAL 1M PCTINCREASE 0 NEXT 512K) NOLOGGING PARALLEL;
    CREATE TABLE with LOB/BFILE/VARRAY columns,
    partitioning/PARALLEL/CREATE TABLE AS SELECT options,
    ALTER TABLE with ADD/MODIFY column options, CREATE INDEX
    *Action:   Do not use the disallowed feature(s) in this release.
    CREATE BITMAP INDEX IOTObj_Table_BMI1 ON IOTObj_Table (numberData)
    LOCAL STORAGE (INITIAL 1M PCTINCREASE 0 NEXT 512K) NOLOGGING PARALLEL
    Error at Command Line:99 Column:13
    Error report:
    SQL Error: ORA-00903: invalid table name
    00903. 00000 - "invalid table name"
    7) Creating a secondary local b-tree index is fine, like so...
    SQL> CREATE INDEX IOTObj_Table_I1 ON IOTObj_Table (numberData)
    LOCAL STORAGE (INITIAL 1M PCTINCREASE 0 NEXT 512K) NOLOGGING PARALLEL;
    index IOTOBJ_TABLE_I1 created.
    8) A quick test to ensure object table ok...
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('DEF456',500));
    SQL> 1 rows inserted.
    SQL> SELECT * FROM IOTObj_Table;
    TEXTDATA NUMBERDATA
    DEF456     500

    Thanks Dan,
    the intention is to range partition based on the initial character, so A* -> Text_Part_A, B* -> Text_Part_B, and so on.
    Here's an example, using an empty IOTObj_Table as created previously.
    1) Set up & confirm some test data (two 'D's, one 'N', and two 'Z's)
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('DEF456',500));
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('DDD111',510));
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('N3000',515));
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('ZZ1212',520));
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('Z111X',530));
    SQL> COMMIT;
    SQL> SELECT * FROM IOTObj_Table;
    TEXTDATA NUMBERDATA
    DDD111     510
    DEF456     500
    N3000     515
    Z111X     530
    ZZ1212     520
    2) Just to prove our IOT is enforcing the Primary Key based on the TextData attribute, try to insert a duplicate
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('Z111X',530));
    Error starting at line 141 in command:
    INSERT INTO IOTObj_Table VALUES (IOT_Type('Z111X',530))
    Error report:
    SQL Error: ORA-00001: unique constraint (OCDataSystems.SYS_IOT_TOP_84235) violated
    00001. 00000 - "unique constraint (%s.%s) violated"
    *Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
    For Trusted Oracle configured in DBMS MAC mode, you may see
    this message if a duplicate entry exists at a different level.
    *Action:   Either remove the unique restriction or do not insert the key.
    3) Now confirm that our data has been slotted into the range-based partition we expect using the PARTITION clause of SELECT...
    - The two 'D's...
    SQL> SELECT * FROM IOTObj_Table PARTITION (Text_Part_D);
    TEXTDATA NUMBERDATA
    DDD111     510
    DEF456     500
    - The single 'N'...
    SQL> SELECT * FROM IOTObj_Table PARTITION (Text_Part_N);
    TEXTDATA NUMBERDATA
    N3000     515
    - The two 'Z's...
    SQL> SELECT * FROM IOTObj_Table PARTITION (Text_Part_Z);
    TEXTDATA NUMBERDATA
    Z111X     530
    ZZ1212     520
    4) And to wrap up confirm an empty partition
    SELECT * FROM IOTObj_Table PARTITION (Text_Part_W);

  • How can I use object type in Jdeveloper 11g?

    Dear friends
    I made some object types(Database layer) and each one refer to functions or procedures to generate table or view, for instance in one of my project I could make a View Object with this function and generate a table:
    Select * from table (genarate_emp(2019))
    In this sample I used a static value (2019) and I did it perfectly, but I want to make a table with dynamic value for instance I would like to set partial trigger of this view object and get dynamic value from the other view object.
    Please help me if you have any suggestions.
    Best regards,
    Babak Saraie

    Hi Babak
    It's a common requirement on posting to this forum that you describe which version of JDeveloper you're using and what technologies (obviously ADF BC in this case).
    For making the static value dynamic within your View Object, are you familiar with the View Object bind variables/bind parameters? This will allow you to define a named variable in your VO that you can set programmatically or even let the user set. Play around with those first and see if they solve one part of your problem, then come back to the forum for the second part.
    Regards,
    CM.

  • How to insert with select in table with object types

    I am in the proces of redesigning some tables, as i have upgraded from
    personal oracle 7 to personal oracle 8i.
    I have constructed an object type Address_type, which is one of the columns
    in a table named DestTable.
    The object type is created as follows:
    CREATE OR REPLACE TYPE pub.address_type
    AS OBJECT
    Street1 varchar2(50),
    Street2 varchar2(50),
    ZipCode varchar2(10));
    The table is created as follows:
    CREATE TABLE pub.DestTable
    (id INTEGER PRIMARY KEY,
    LastName varchar2(30),
    FirstName varchar2(25),
    Address pub.address_type);
    Inserting a single row is ok as i use the following syntax:
    Insert into DestTable(1, '******* ', 'Lawrence', pub.address_type(
    '500 Oracle Parkway', 'Box 59510', '95045'));
    When i try to insert values into the table by selecting from another table i
    cannot do it and cannot figure out what is wrong
    I have used the following syntax:
    Insert into DestTable
    id, name, pub.address_type(Street1, Street2, ZipCode))
    select
    id, lastname, firstname, street1, street2, ZipCode
    from SourceTable;
    I have also tried the following syntax:
    Insert into DestTable
    id, name, pub.address_type(Address.Street1, Address.Street2,Address.ZipCode))
    select
    id, lastname, firstname, street1, street2, ZipCode
    from SourceTable;
    What is wrong here ?
    null

    Magnus,
    1. Check out the examples on 'insert with subquery' in http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a85397/state21b.htm#2065648
    2. Correct your syntax that repeated the column definition after "insert into ..."
    Insert into DestTable
    id, name, pub.address_type(Street1, Street2, ZipCode))
    select
    id, lastname, firstname, street1, street2, ZipCode
    from SourceTable;
    Regards,
    Geoff
    null

  • FM to create Object Type(ET) - LSO

    Hi all,
    Can you please suggest me the function module which is used to create an object type "ET"  which involves infotypes namely 1000, 1001, 1026. There's one LSO function module which is used typically when a student is booked into a new static Web Based Training Course Type (D), which automatically creates the ET.
    Suggestions will be appreciated and suitable points will be rewarded.
    Thanks in advance,
    Vaishnavi.

    Hi Vaishnavi,
    If you have implementation knowledge on LSO,  please can you help me?
    plz mail me at   [email protected]
    Thanks in advance.
    sadana.
    Edited by: sadana saphr on May 21, 2008 9:22 AM

  • Designer and SDO_GEOMETRY object type

    I want to have tables with columns of object type MDSYS.SDO_GEOMETRY (Oracle Spatial's type) in Designer 9i and then generate these tables.
    So I created in Oracle Object Types branch object type called MDSYS.SDO_GEOMETRY without attributes, methods or source table.
    Then I created in Designer table with column named GEOMETRY which has Datatype property empty and Oracle Type property of value MDSYS.SDO_GEOMETRY.
    But when I generate this table I get these two messages:
    CDS-11349 Warning: The Oracle Object Type MDSYS.SDO_GEOMETRY cannot be generated.
    CDS-18025 Error: Table 'PRK_PRIMER_GEO_SDO' will not be created as Oracle Object Type 'MDSYS.SDO_GEOMETRY' is not created
    Object type MDSYS.SDO_GEOMETRY already exists in database for sure.
    What is wrong here?
    Regards
    Saso Celarc

    I think, Designer cannot handle SDO_GEOMETRY type.
    Workaround: use a other datatype/size not used in your schema ( such as varchar2(99) ), generate scripts and do a text substitution on them to SDO_GEOMETRY.

  • OMB05602: An unknown Deployment error has occured for Object Type Deploymen

    I was deploying a process_flow package here in named "PF_LOAD", then the following error occured.
    OMB05602: An unknown Deployment error has occured for Object Type DeploymentContextImpl.generate WBGeneratedObject[] is null or length 0 for PF_LOAD.
    Does anyone know what this error means or what possibly caused it?
    So

    Hi David
    OWB version 10.2.0.3.0
    This is what I cought from the log when tried to deploy the process flow via OMB+
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN_PROCESS_FLOWS'
    Action plan DEPLOY_PLAN_PROCESS_FLOWS created.
    OMBALTER DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN_PROCESS_FLOWS' ADD ACTION 'PF_LOAD_PROCESS_FLOW_PACKAGE_DEPLOY' SET PROPERTIES (OPERATION) VALUES ('REPLACE') SET REFERENCE PROCESS_FLOW_PACKAGE 'PF_LOAD'
    Action plan DEPLOY_PLAN_PROCESS_FLOWS altered.
    OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN_PROCESS_FLOWS'
    OMB05602: An unknown Deployment error has occured for Object Type DeploymentContextImpl.generate WBGeneratedObject[] is null or length 0 for PF_LOAD.
    When I viewed via the control center jobs detail window, it is not even logged there.
    Cheers
    So

  • JDOQL queryfilter failure while retrieving field of "java.lang.Object" Type.

    PROBLEM DESCRIPTION --->
    JDOQL FILTER ON A FIELD OF "java.lang.Object" TYPE, NOT WORKING.
    HELP REQUESTED WITH SUGGESTIONS OR POINTERS TO THE CORRECT SOLUTION.
    Deatiled Problem :=
    Environment :=
    Kodo version 2.4.1 (on Windows 2000).
    J2SDK 1.3.1_06 (on Windows 2000).
    Database:= MySQL 3.23.55 (on Windows 2000).
    Java Class Hierarchy Example:=
    SuperPersistentObject
    |__ LevelOneDescendant
    |__ LevelTwoDescendant
    |__ LastDescendant
    Procedures Followed :=
    Java class named "LastDescendant" is enhanced and persisted in the
    database.
    The field "m_value" is of java type "java.lang.Object" and is
    represented as a "blob" in the database.
    Aadequate data is pumped in the field "m_value" (Data of Type
    String/Integer/Double/Boolean etc.). The class "LastDescendant" is
    retrieved using following JDO specific code :=
    SUCCESSFUL EXAMPLE :=
    Extent extent= PersistentManager.getExtent
    (com.name.project.LastDescendant.class, false);
    String m_queryFilter = "";
    Query query = PersistentManager.getQuery(extent, m_queryFilter);
    Collection m_resultset = (Collection)query.execute();
    The above code returns all the available "LastDescendant" objects
    persisted in the DB. Post Load, The value in the field "m_value" of
    all the retrieved "LastDescendant" objects, is testeded successfully
    and found to be matching to the expected values.
    FAILED EXAMPLE :=
    Extent extent= PersistentManager.getExtent
    (com.name.project.LastDescendant.class, false);
    //Retrieving only the objects whose "m_value" field contains Integer
    // values, between 10 and 9000. (110 objects with Integer value
    // between 10 and 9000 are pumped in the DB, for testing).
    String m_queryFilter = "(m_value >= 10 && m_value <= 9000)";
    Query query = PersistentManager.getQuery(extent, m_queryFilter);
    Collection m_resultset = (Collection)query.execute();
    NO "LastDescendant" OBJECTS RETRIEVED, the Collection "m_resultset" is
    Empty, (Actually Expecting 110 objects).
    Tried every other way, using "declareImports()"/ "declareParameters()"/
    "declareVariables()" etc. Tried TypeCasting the m_value field to Integer,
    but to no avail.
    Actual Classes :=
    public class SuperPersistentObject implements java.io.Serializable {
    protected String appKey;
    public class LevelOneDescendant extends SuperPersistentObject {
    protected SuperPersistentObject m_classRef;
    public class LevelTwoDescendant extends LevelOneDescendant {
    protected Object m_value;
    public class LastDescendant extends LevelTwoDescendant {
    "project.jdo" meta-data entry :=
    <class name="SuperPersistentObject"
    identity-type="application"
    objectid-class="com.name.project.AppKeyImpl">
    <field name="appKey" primary-key="true"/>
    </class>
    <class name="LevelOneDescendant" identity-type="application"
    persistence-capable-superclass =
    "com.name.project.SuperPersistentObject">
    </class>
    <class name="LevelTwoDescendant" identity-type="application"
    persistence-capable-superclass =
    "com.name.project.LevelOneDescendant">
    <field name="m_value">
    <extension vendor-name="kodo" key="data-column" value="VALUE"/>
    </field>
    </class>
    <class name="LastDescendant" identity-type="application"
    persistence-capable-superclass="com.name.project.LevelTwoDescendant">
    </class>
    JDO related properties :=
    javax.jdo.PersistenceManagerFactoryClass =
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
    javax.jdo.option.ConnectionURL= jdbc:mysql://localhost/PRTestDB
    javax.jdo.option.ConnectionUserName= SuperUser
    javax.jdo.option.ConnectionPassword= <xxxxxx>
    javax.jdo.option.ConnectionDriverName= com.mysql.jdbc.Driver
    javax.jdo.option.Optimistic= true
    javax.jdo.option.RetainValues= true
    javax.jdo.option.NontransactionalRead= true
    javax.jdo.option.NontransactionalWrite= true
    javax.jdo.option.RestoreValues= true
    javax.jdo.option.Multithreaded= true
    javax.jdo.option.MsWait= 5000
    javax.jdo.option.IgnoreCache= false
    javax.jdo.option.MinPool= 1
    javax.jdo.option.MaxPool= 80
    com.solarmetric.kodo.impl.jdbc.WarnOnPersistentTypeFailure= true
    com.solarmetric.kodo.impl.jdbc.SequenceFactoryClass=
    com.solarmetric.kodo.impl.jdbc.schema.DBSequenceFactory
    com.solarmetric.kodo.impl.jdbc.FlatInheritanceMapping= true
    com.solarmetric.kodo.LicenseKey= <xxxx-yyyy-zzzz-2345-6789>
    com.solarmetric.kodo.EnableQueryExtensions= false
    com.solarmetric.kodo.DefaultFetchThreshold= 30
    com.solarmetric.kodo.DefaultFetchBatchSize= 10

    You can't query on a blob column.

  • IMPDP Help needed please...ORA-39083: Object type PROCOBJ failed to create

    OS=Win2003
    DB=10gR2
    Version = 102.0.4
    Hi,
    I am running a impdp on a 30gb file and well it seems to have gone fine (much faster then it normally does to be honest), but towards the end it fails, and when researching this error, it seems to be very vague and I was wondering if someone can help me. Below is the log, but I have taken parts out of it that are not relevant.
    Import: Release 10.2.0.4.0 - Production on Wednesday, 16 April, 2008 15:22:18
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Master table "SYSTEM"."IMPGEMDEV041608" successfully loaded/unloaded
    Starting "SYSTEM"."IMPGEMDEV041608": system/********@iworksdb directory=DATA_PUMP_DIR dumpfile=expdpgemdev.dmp job_name=impgemdev041608 TABLE_EXISTS_ACTION=APPEND SCHEMAS=GEMDEV LOGFILE=IMPIWORKS_BOON.log REMAP_SCHEMA=GEMDEV:IWORKS REMAP_TABLESPACE=IWORKS_INDEX:IWORKS_IDX REMAP_TABLESPACE=IWORKS_IOT:IWORKS_IDX REMAP_TABLESPACE=IWORKS_TABLES:IWORKS_TABLES EXCLUDE=GRANT exclude=statistics STREAMS_CONFIGURATION=N
    Processing object type SCHEMA_EXPORT/USER
    ORA-31684: Object type USER:"IWORKS" already exists
    Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
    Processing object type SCHEMA_EXPORT/ROLE_GRANT
    Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
    Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
    Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
    Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
    ORA-31684: Object type TYPE:"IWORKS"."T_NUMBER_TAB" already exists
    ORA-31684: Object type TYPE:"IWORKS"."T_VARCHAR2_TAB" already exists
    Processing object type SCHEMA_EXPORT/TABLE/TABLE
    ORA-39152: Table "IWORKS"."SYS_TOKENTYPE" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
    ORA-31684: Object type PACKAGE:"IWORKS"."CONT_FEE_DEF_UC" already exists
    ORA-31684: Object type PACKAGE:"IWORKS"."COPAYCALCFLAG" already exists
    ORA-31684: Object type VIEW:"IWORKS"."VWTREE" already exists
    ORA-31684: Object type VIEW:"IWORKS"."V_ROUTE_DTL_GROUP" already exists
    Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
    Processing object type SCHEMA_EXPORT/TABLE/TRIGGER
    Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_AND_BITMAP/INDEX
    Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
    ORA-39083: Object type PROCOBJ failed to create with error:
    ORA-06550: line 2, column 11:
    PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:
    := . ( @ % ;
    The symbol ":=" was substituted for "VARCHAR2" to continue.
    ORA-06550: line 3, column 12:
    PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:
    := . ( @ % ;
    The symbol ":=" was substituted for "VARCHAR2" to continue.
    ORA-06550: line 4, column 19:
    PLS-00103: Encountered the symbol "VARCHAR
    ORA-39083: Object type PROCOBJ failed to create with error:
    ORA-06550: line 6, column 16:
    PLS-00103: Encountered the symbol "RAYSQLACCESS9889405" when expecting one of the following:
    * & = - + ; < / > at in is mod remainder not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
    LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
    The symbol "* was inserted before "RAYSQLACCESS9889405" to continue.
    ORA-06550: line 7, column 17:
    PLS-00103: Encountered the symbol "SQL" when expectin
    Job "SYSTEM"."IMPGEMDEV041608" completed with 2831 error(s) at 15:30:37
    Any help will be much appreciated

    I can not seem to find any object named PROCOBJ.
    As for the object called RAYSQLACCESS9889405...no idea what this is.
    I checked the source for any invalid objects and none.

  • Error in creation of Object Type from XML passed

    Hi,
    I am facing a problem creating a appropriate a object type for a XML.
    Below are the details:
    XML Passed
    <mer_offer_action_data>
    <form_id>
    134039588
    </form_id>
    <action_cd>
    OA
    </action_cd>
    <offer_decline_reason_cd>
    </offer_decline_reason_cd>
    <start_dt>
    </start_dt>
    <candidate>
    <ds_prs_id>
    109315
    </ds_prs_id>
    <ds_prs_id>
    110534
    </ds_prs_id>
    <ds_prs_id>
    110059
    </ds_prs_id>
    </candidate>
    </mer_offer_action_data>
    Types Declaration
    +CREATE OR REPLACE type MER_OFF_CANDIDATE
    AS
    OBJECT
    DS_PRS_ID NUMBER
    CREATE OR REPLACE TYPE MER_OFF_CANDIDATE_t
    AS
    TABLE OF MER_OFF_CANDIDATE;
    CREATE OR REPLACE type MER_OFFER_ACT_DATA
    AS
    OBJECT
    FORM_ID NUMBER,
    ACTION_CD VARCHAR2(6),
    OFFER_DECLINE_REASON_CD VARCHAR2(6),
    START_DT VARCHAR2(11),
    CANDIDATE MER_OFF_CANDIDATE_t
    CREATE OR REPLACE TYPE MER_OFFER_ACT_DATA_t
    AS
    TABLE OF MER_OFFER_ACT_DATA;
    CREATE OR REPLACE type MER_OFFER_ACTION_DATA
    AS
    OBJECT
    MER_OFF_ACT_DATA MER_OFFER_ACT_DATA_t
    /+
    My Declaration
    +merOffActDataXML      xmltype;
    merOffActData     MER_OFFER_ACTION_DATA := MER_OFFER_ACTION_DATA(MER_OFFER_ACT_DATA_t());+
    Inside Pl/SQL block
    +-- Converts XML data into user defined type for further processing of data
    xmltype.toobject(merOffActDataXML,merOffActData);+
    when I run the Pl/Sql block it gives me error
    ORA-19031: XML element or attribute FORM_ID does not match any in type ORADBA.MER_OFFER_ACTION_DATA
    which means the object type mapping is wrong
    I would like to know whether the object type I had created is correct or not.
    Thanks for your help
    Beda

    Bedabrata Patel wrote:
    Below are the details:The details except for a description of the problem
    I am facing a problem creating a appropriate a object type for a XML.And which error you are getting
    Error in creation of Object Type http://download.oracle.com/docs/cd/E11882_01/server.112/e10880/toc.htm
    And which version of Oracle you are getting the unknown error creating the unknown problem.

  • Error in creation of Object Type

    Hi,
    I am facing a problem creating a appropriate a object type for a XML.
    Below are the details:
    XML Passed
    <mer_offer_action_data>
         <form_id>
              134039588
         </form_id>
         <action_cd>
              OA
         </action_cd>
         <offer_decline_reason_cd>
         </offer_decline_reason_cd>
         <start_dt>
         </start_dt>
         <candidate>
              <ds_prs_id>
                   109315
              </ds_prs_id>
              <ds_prs_id>
                   110534
              </ds_prs_id>
              <ds_prs_id>
                   110059
              </ds_prs_id>
         </candidate>
    </mer_offer_action_data>
    Types Declaration
    +CREATE OR REPLACE type MER_OFF_CANDIDATE
    AS
    OBJECT
    DS_PRS_ID NUMBER
    CREATE OR REPLACE TYPE MER_OFF_CANDIDATE_t
    AS
    TABLE OF MER_OFF_CANDIDATE;
    CREATE OR REPLACE type MER_OFFER_ACT_DATA
    AS
    OBJECT
    FORM_ID NUMBER,
    ACTION_CD VARCHAR2(6),
    OFFER_DECLINE_REASON_CD VARCHAR2(6),
    START_DT VARCHAR2(11),
    CANDIDATE MER_OFF_CANDIDATE_t
    CREATE OR REPLACE TYPE MER_OFFER_ACT_DATA_t
    AS
    TABLE OF MER_OFFER_ACT_DATA;
    CREATE OR REPLACE type MER_OFFER_ACTION_DATA
    AS
    OBJECT
    MER_OFF_ACT_DATA MER_OFFER_ACT_DATA_t
    /+
    My Declaration
         +merOffActDataXML          xmltype;
         merOffActData          MER_OFFER_ACTION_DATA := MER_OFFER_ACTION_DATA(MER_OFFER_ACT_DATA_t());+
    Inside Pl/SQL block
         +-- Converts XML data into user defined type for further processing of data
         xmltype.toobject(merOffActDataXML,merOffActData);+
    Thanks for your help
    Beda
    Edited by: Bedabrata Patel on Jul 12, 2010 5:51 AM

    Bedabrata Patel wrote:
    Below are the details:The details except for a description of the problem
    I am facing a problem creating a appropriate a object type for a XML.And which error you are getting
    Error in creation of Object Type http://download.oracle.com/docs/cd/E11882_01/server.112/e10880/toc.htm
    And which version of Oracle you are getting the unknown error creating the unknown problem.

  • PL/SQL Object Type - Java oracle.jbo.domain

    PL/SQL Object Type <-> Java oracle.jbo.domain
    can anybody help me, getting my domains to work?
    Following scenario:
    in pl/sql we have an object type called MULTI_LANGUAGE. This type is used for storing multilingual texts as nested table in one(!) column.
    So the object MULTI_LANGUAGE contains a member variable LANGUAGE_COLLECTION of type LANGUAGE_TABLE, which itself is a nested table of objects
    of the type LANGUAGE_FIELD (this again is only a language id and the corresponding content)
    Also the methods setContent(langID, langContent) and getContent(langId) are defined on Object MULTI_LANGUAGE.
    For example: Table having primary key, 2 other columns and one column of object type MULTI_LANGAGE (=nested table of objects)
    |ID|Column1|Column2|  multilingual Column  |
    |--|---------------------------------------|
    |  |       |       |  -------------------  |
    |  |       |       | | 1 | hello         | |
    |  |       |       |  -------------------  |
    |1 | foo   | bar   | | 2 | hallo         | |   <- Row Nr 1
    |  |       |       |  -------------------  |
    |  |       |       | | 3 | ola           | |
    |  |       |       |  -------------------  |
    |--|-------|-------|-----------------------|
    |  |       |       |  -------------------  |
    |  |       |       | | 1 | world         | |
    |  |       |       |  -------------------  |
    |2 | abc   | def   | | 2 | welt          | |   <- Row Nr 2
    |  |       |       |  -------------------  |
    |  |       |       | | 3 | ???  ;-)      | |
    |  |       |       |  -------------------  |
    |--|-------|-------|-----------------------|Now i've tried to modell this structure as an oracle.jbo.domain.
    class MultiLanguage extends Struct having this StructureDef:
    attrs[(0)] = new DomainAttributeDef("LanguageColl", "LANGUAGE_COLL", 0, oracle.jbo.domain.Array.class, 2003, "ARRAY", -127, 0, false, "campusonlinepkg.common.LanguageField");
    and
    class LanguageField extends Struct having this StructureDef:
    attrs[(0)] = new DomainAttributeDef("Id", "ID", 0, oracle.jbo.domain.Number.class, 2, "NUMERIC", -127, 0, false);
    attrs[(1)] = new DomainAttributeDef("Content", "CONTENT", 1, java.lang.String.class, 12, "VARCHAR", -127, 4000, false);
    Is there anything wrong with this StructureDef?
    When running the BC-Browser with -Djbo.debugoutput=console -Djbo.jdbc.driver.verbose=true parameters I get suspect warnings when browsing the records
    [196] Executing FAULT-IN...SELECT NR, NAME FROM B_THESAURI BThesauri WHERE NR=:1
    [197] SQLException: SQLState(null) vendor code(17074)
    [198] java.sql.SQLException: Ungültiges Namensmuster: XMLTEST.null
    ...snip: detail of stack...
    [240] SQLException: SQLState(null) vendor code(17060)
    [241] java.sql.SQLException: Deskriptor konnte nicht erstellt werden: Unable to resolve type "null"
    ...snip: detail of stack...
    [280] Warning:No element type set on this array. Assuming java.lang.Object.
    (XMLTEST is the name of the schema)
    Seems as if the framework can't read the TypeDescriptor or does not know which descriptor to read (XMLTEST.null??)
    Do I have to implement my own JboTypeMap?
    Please help, I'm stuck.
    Thanks in advance, Christian

    Thanks for your suggestion, but it seems to me as if there is one level missing.
    in pl/sql I have following structure:
    Struct MULTI_LANGUAGE (Object type) - outermost
      Array LANGUAGE_TABLE (nested table type)
        Struct LANGUAGE_FIELD (Object type simple) - innermostthe reason why i had to wrap another struct around the array was because it is not possible to define methods on a nested table. this is only possible on objects.
    on the outermost object type (which holds the array of language fields) I needed to define following 2 methods for direct access:
    getContent (langId in number) returns varchar2
    setContent (langId in number, langContent in varchar2)
    I would like to rebuild the same structure in java, because newly written java code should live in perfect harmony with legacy pl/sql code ;-)
    Both applications (Java and pl/sql) have to access the same data as long as migration to java goes on.
    Is this nested structure too much for a Domain?
    Any other suggestions?
    Thanks again, Christian

  • How to sort a Vector that stores a particular object type, by an attribute?

    Hi guys,
    i need help on this problem that i'm having. i have a vector that stores a particular object type, and i would like to sort the elements in that vector alphabetically, by comparing the attribute contained in that element. here's the code:
    Class that creates the object
    public class Patient {
    private String patientName, nameOfParent, phoneNumber;
    private GregorianCalendar dateOfBirth;
    private char sex;
    private MedicalHistory medHistory;
    public Patient (String patientName, String nameOfParent, String phoneNumber, GregorianCalendar dateOfBirth, char sex) {
    this.patientName = patientName;
    this.nameOfParent = nameOfParent;
    this.phoneNumber = phoneNumber;
    this.dateOfBirth = dateOfBirth;
    this.sex = sex;
    this.medHistory = new MedicalHistory();
    Class that creates the Vector.
    public class PatientDatabase {
    private Vector <Patient> patientDB = new Vector <Patient> ();
    private DateFunction date = new DateFunction();
    public PatientDatabase () throws IOException{
    String textLine;
    BufferedReader console = new BufferedReader(new FileReader("patient.txt"));
    while ((textLine = console.readLine()) != null) {
    StringTokenizer inReader = new StringTokenizer(textLine,"\t");
    if(inReader.countTokens() != 7)
    throw new IOException("Invalid Input Format");
    else {
    String patientName = inReader.nextToken();
    String nameOfParent = inReader.nextToken();
    String phoneNum = inReader.nextToken();
    int birthYear = Integer.parseInt(inReader.nextToken());
    int birthMonth = Integer.parseInt(inReader.nextToken());
    int birthDay = Integer.parseInt(inReader.nextToken());
    char sex = inReader.nextToken().charAt(0);
    GregorianCalendar dateOfBirth = new GregorianCalendar(birthYear, birthMonth, birthDay);
    Patient newPatient = new Patient(patientName, nameOfParent, phoneNum, dateOfBirth, sex);
    patientDB.addElement(newPatient);
    console.close();
    *note that the constructor actually reads a file and tokenizes each element to an attribute, and each attribute is passed through the constructor of the Patient class to instantiate the object.  it then stores the object into the vector as an element.
    based on this, i would like to sort the vector according to the object's patientName attribute, alphabetically. can anyone out there help me on this?
    i have read most of the threads posted on this forum regarding similar issues, but i don't really understand on how the concept works and how would the Comparable be used to compare the patientName attributes.
    Thanks for your help, guys!

    Are you sure that you will always sort for the patient's name throughout the application? If not, you should consider using Comparators rather than implement Comparable. For the latter, one usually should ensure that the compare() method is consistent with equals(). As for health applications it is likely that there are patients having the same name, reducing compare to the patient's name is hazardous.
    Both, Comparator and Comparable are explained in Sun's Tutorial.

Maybe you are looking for

  • HT1476 What is fire wire charging device

    What is a fire wire charging device

  • Difference in PDFs

    I have a question about PDFs. What is the difference, if any, between the PDFs created via the Pages' Export menu and those available in the Print dialog window? I'm interested in producing the best quality for reproduction. Thanks, Walt

  • How to fix "load correct tray A4" error message?

    I have Bonjour on two PCs (one Windows XP Professional, one Vista) networked to a new Mac Mini (Lion OS) with Canon MF4270 printer attached to USB port. Pages print from the Mac with no problem, but when I print from either PC the job prints the firs

  • Restart corruption after Software Update

    I was prompted to run a software update for Quicktime and Prokit today (not sure of the versions, but I update frequently so they are the most recent.) Leopard (er "Kitty Cat" rather) attempted to restart after the update, but it was stuck on quittin

  • Cs6-acrobat x install

    i purchased a new mac running Yosemite, i downloaded the CS6 install dmg. everything installs except acrobat X. when i look at help window it shows "pending download."