Mapping dependencies between objects

I'm querying a database to obtain information from 10 tables. The goal is to display the information on a JSF based portlet using a tree-view, where an user can use the tree interface to drill to desired level of detailed information. The interface may need to show 3/4 different tree-views of the same data set.
To begin with, I'm doing a join across those tables and load a hash (representing the first hierarchy in the tree) with multiple levels to represent the tree-view or the dependency between various parameters. If there are 3 views required, I'm thinking about building 3 such hashes - where the elements in the hash will probabaly be derived from a TreeNode class to build the gui. Since all the views refer to the same underlying data model, each node of the Hash will actually refer to some object that stores the model data.
I have two questions:
* Currently I'm building the hash by parsing the ResultSet obtained from query; Is there a better way to do this? I thought about using O/R mappers; but I couldn't think of an elegant solution to load the collections from a query to represent the dependencies dictated by the view.
* Is there a better way to design the query?
I would really appreciate any comments.

Thanks for the suggestions. I have a generic class for building a tree-view - and that uses recursion. However, that doesn't need to know about the parent-child relationship. I was thinking of parsing the db query result and store the parent child relationship in a nested hash. My generic Tree class implementation would know to take this nested hash and build the tree. Essentially an instantiation of the generic class or it's extended version would act as a backing bean for a JSF component.
Anyway, I'll try to focus more on a Hibernate based approach as you guys hinted. I'll wait for Dave's feedback. Actually, I have his book on the portlet API.

Similar Messages

  • PowerDesigner doesn't respect dependencies between objects when generating script

    Good afternoon,
    I'm getting very frustrated trying to do something that should be 'by default' or easy to configure within PowerDesigner 16.5 working with a SQL Server 2008 R2 database.
    I reverse-engineered a database into a physical model for modifications and I want to generate DDL from the physical model.   I've worked around some issues including how to support SQL Server filtered indexes and a few others things. 
    However a really stupid think that I have not been able to figure out is how to have the script respect dependencies between objects in the model.   When looking at the model at the Dependencies table the dependencies seem to be in place correctly.   But when I choose the 'Generate Database...' menu item to generate a single script to create all of the objects within a database it does create them all but in alphabetical order which does not work because there are dependencies between objects (views, in particular) that requires specific views to be created in a different order depending on their dependencies.
    Most tools understand the dependencies and create a script that will work.
    How can I generate a database script from PowerDesigner that respects the dependencies between the objects (in this case between different databse views) so they get scripted out in the correct order.
    Thanks much,
    Don

    I figured this out via the use of 'Traceability Links' within the View Properties.  
    Let me tell you... the only way to set these is to create a diagram and visually link things together because working through the grid on the property pages to select additional Linked Objects is just incredibly slow and painful.   You should be able to just free-text enter Linked Object names (with the model validating them) without having to traverse the model to individually select each object.   I had a lot of dependencies and it took several hours to incorporate them all.
    I'm also disappointed that the reverse-engineering of a SQL Server database into a physical model doesn't use the sysdepends data to create 'Traceability Links' to associate dependencies between views, stored procedures, etc.   That would have saved me a lot of work.
    I know that PowerDesigner is a 'generic' product that works with several databases... but being a person that only works with a particular database (in my case SQL Server) the lack of out of the box support (filtered index reverse engineering is an example that quickly comes to mind) is frustrating.

  • Dependencies between Objects

    Hi Folks,
    My client has asked me to move from one db to another. (I don't know why, may be they are restructuring). Now the problem is that there are many stored procedures, functions and tables which I have created and also using somewhere. Now for moving these objects
    I have to do manual checks on each of my procedure to find out dependencies.
    First I used SP_DEPENDS but that didn't show correct results. Then I did use
    SYS.DM_SQL_REFERENCING_ENTITIES, but a weird thing I noticed. Some of my procedures are not listed in this table.
    Basically I need the output in below format:
    NAME
    TYPE
    DEPENDED UPON
    TYPE
    COLUMN NAME
    RealTimeLeads
    Stored Proc
    INSTrigger
    Trigger
    OfferDateTime
    RealTimeLeads
    Stored Proc
    INSTrigger
    Trigger
    EnquiryDateTime
    RealTimeLeads
    Stored Proc
    cc_lead__c_upd
    User Table
    ID__c
    RealTimeLeads
    Stored Proc
    cc_lead__c_upd
    User Table
    CustomerName__c
    RealTimeLeads
    Stored Proc
    cc_lead__c_upd
    User Table
    Product__c
    SP_CampaignDashboard
    Stored Proc
    CampaignDashboard
    User Table
    CD_ID
    SP_CampaignDashboard
    Stored Proc
    EmailCampaign_Attempts
    User Table
    AttemptCount
    SP_CampaignDashboard
    Stored Proc
    OfferProduct_Master
    User Table
    Product__c
    SP_CampaignDashboard
    Stored Proc
    Portal_Campaign_Attempts
    User Table
    AttemptCount
    SP_CampaignDashboard
    Stored Proc
    Responses
    User Table
    ResponseDate
    SP_CampaignDashboard
    Stored Proc
    SMS_Campaign_Attempts
    User Table
    AttemptCount
    Chaos isn’t a pit. Chaos is a ladder. Many who try to climb it fail and never get to try again. The fall breaks them. And some are given a chance to climb, but they refuse. They cling to the realm, or the gods, or love. Illusions. Only the ladder is real.
    The climb is all there is.

    I did some tests. If you do not have sys.dm_sql_referencing_entities, you probably run SQL Server 2005 or lower. Alas, SQL_Dependencies seems to have the same shortcommings as the old fashioned dbo.sysdepends view. When you create an object referencing an
    object that doesn't exist yet, this reference is not captured. Changing the order of creation can help you out. However, circular references will never be captured. Also, dropping and re-creating an object destroys the information in this view. Proof:
    The below creation order causes the link between TestProc and TestView to be missed.
    CREATE PROC TestProc AS SELECT * FROM TestView
    GO
    CREATE TABLE TestTab (i int not null)
    GO
    CREATE VIEW TestView AS SELECT * FROM TestTab
    GO
    -- Transact-SQL Statement to list all objects and their dependencies (SQL Server 2005).
    SELECT SCH.name + '.' + OBJ.name AS ObjectName
    ,OBJ.type_desc AS ObjectType
    ,REFSCH.name + '.' + REFOBJ.name AS ReferencedObjectName
    ,REFOBJ.type_desc AS ReferencedObjectType
    ,REFCOL.name AS ReferencedColumnName
    ,DEP.class_desc AS ReferenceClass
    ,DEP.is_selected AS IsSelected
    ,DEP.is_select_all AS IsSelectAll
    ,DEP.is_updated AS IsUpdated
    FROM sys.sql_dependencies AS DEP
    INNER JOIN
    sys.objects AS OBJ
    ON DEP.object_id = OBJ.object_id
    INNER JOIN
    sys.schemas AS SCH
    ON OBJ.schema_id = SCH.schema_id
    INNER JOIN sys.objects AS REFOBJ
    ON DEP.referenced_major_id = REFOBJ.object_id
    INNER JOIN sys.schemas AS REFSCH
    ON REFOBJ.schema_id = REFSCH.schema_id
    LEFT JOIN sys.columns AS REFCOL
    ON DEP.class IN (0, 1)
    AND DEP.referenced_minor_id = REFCOL.column_id
    AND DEP.referenced_major_id = REFCOL.object_id
    ORDER BY ObjectName
    ,ReferencedObjectName
    ,REFCOL.column_id
    GO
    DROP TABLE TestTab
    GO
    DROP VIEW TestView
    GO
    DROP PROC TestProc
    GO
    Changing the order helps:
    CREATE TABLE TestTab (i int not null)
    GO
    CREATE VIEW TestView AS SELECT * FROM TestTab
    GO
    CREATE PROC TestProc AS SELECT * FROM TestView
    GO
    -- Transact-SQL Statement to list all objects and their dependencies (SQL Server 2005).
    SELECT SCH.name + '.' + OBJ.name AS ObjectName
    ,OBJ.type_desc AS ObjectType
    ,REFSCH.name + '.' + REFOBJ.name AS ReferencedObjectName
    ,REFOBJ.type_desc AS ReferencedObjectType
    ,REFCOL.name AS ReferencedColumnName
    ,DEP.class_desc AS ReferenceClass
    ,DEP.is_selected AS IsSelected
    ,DEP.is_select_all AS IsSelectAll
    ,DEP.is_updated AS IsUpdated
    FROM sys.sql_dependencies AS DEP
    INNER JOIN
    sys.objects AS OBJ
    ON DEP.object_id = OBJ.object_id
    INNER JOIN
    sys.schemas AS SCH
    ON OBJ.schema_id = SCH.schema_id
    INNER JOIN sys.objects AS REFOBJ
    ON DEP.referenced_major_id = REFOBJ.object_id
    INNER JOIN sys.schemas AS REFSCH
    ON REFOBJ.schema_id = REFSCH.schema_id
    LEFT JOIN sys.columns AS REFCOL
    ON DEP.class IN (0, 1)
    AND DEP.referenced_minor_id = REFCOL.column_id
    AND DEP.referenced_major_id = REFCOL.object_id
    ORDER BY ObjectName
    ,ReferencedObjectName
    ,REFCOL.column_id
    GO
    DROP TABLE TestTab
    GO
    DROP VIEW TestView
    GO
    DROP PROC TestProc
    GO

  • Import Oracle Designer model dependencies between objects

    Hello,
    I am using the Oracle Designer model import to fill Data Modeler. There are some views which have dependencies on each other, resulting that views which depend on other views are incomplete.
    Is there a way to rerun the import again in the same relational model, since the import utility now opens a new relational model again.
    Is there a kind of logging where you can find these kind of errors?
    Best regards,
    Joop

    Thanks Phillip, but I was actually referring to the version level of the Designer repository itself, not the database instance in which it resides. I seem to remember that you could not upgrade your Designer repository without also upgrading the Oracle Designer client as well; hence my question about compatibility between SQL Developer Data Modeler and various Repository versions.

  • Creating custom mappings between objects

    I currently have a db schmea that supports "soft" deletes. Example:
    Client table has fields:
    id - primary key (number)
    name - varchar
    active ("Y" or "N" where "Y" means active and "N" means "INACTIVE")
    We also have a table Users:
    id - primary key (number)
    name - varchar
    active ("Y" or "N" where "Y" means active and "N" means "INACTIVE")
    When I delete a user I want to set its active field to "N" and then when
    someone reads users from the client (after I have saved my changes) I want
    only users whoses active field is "Y" to be returns, i.e.
    Client clientA = <read client A>
    Collection users = clientA.getUsers();
    Is there a way to configure/customize the mapping/relationship between
    objects?
    Thanks!
    Bruce

    All of the emails are really my way of getting a soft delete to work. Does
    KODO support this feature or is their a standard work around to support
    this feature?
    Thanks!
    Bruce
    Alex Roytman wrote:
    You could break you collection into multiple mutually exclusive
    subcollections (like active/inactive) and have your object model to map them
    separately (via views with mutually exclusive criterion) When changing a
    collection member's status you will need to move it from active collection
    to inactive. Complete collection can be dode as dybamic (delegating)
    composition of the subcollections (but it will cost twice as much to fetch
    it)
    Try to resolve your issues on object model level. I believe altering sql
    mappings to make them very fancy will cause you lots of grief in the long
    run
    "Bruce" <[email protected]> wrote in message
    news:[email protected]...
    I also want to do something similiar to support object history. I could
    have a Client object which gets modified and instead of editing this
    object I would copy it, inactivate the copy and then edit the original.
    This allows for full history. I can always select by active (or a more
    complicated status) to get the rest of the history instead of the "top".
    Views here seems like a hack. I have activew fields in all of my tables so
    I would nee views for each table which is a lot to manage if fields are
    changing (need to change them in both places). Also this creates issues
    since views are really read-only.
    Isn't there a way to change the SQL used to read a relationship?
    Bruce
    Alex Roytman wrote:
    map your classes against views with (where active = 'Y') to make sure
    "soft
    deleted" records do not get read and have your object model to handlesoft
    deletes (like removing from collections etc) use helper methods to do"soft
    deletes" masking real deletes is not good idea - you will need them atsome
    point
    "Stephen Kim" <[email protected]> wrote in message
    news:[email protected]...
    While there is nothing default that does particularly what you desire,
    but from my perspective, you should not have Kodo do anything by
    default
    as you will probably want to delete the inactive instances at somelater
    point.
    Instead you should look into Query.setCandidates:
    http://www.solarmetric.com/Software/Documentation/2.4.3/docs/jdo-javadoc/jav
    ax/jdo/Query.html
    i.e. public Collection getActiveUsers ()
    PersistenceManager pm = JDOHelper.getPersistenceManager
    (this);
    Query q = pm.newQuery (User.class, true);
    q.setFilter ("active == "N"");
    q.setCandidates (users);
    return q.execute ();
    I haven't tested the above code and there are a lot of optimizations
    you
    could do such as caching the query in a transient collection but Ithink
    you get the idea.
    You may want to post your thoughts on our newsgroups
    (news://news.solarmetric.com) and see how other people are tackling
    similar probles..
    Bruce wrote:
    I currently have a db schmea that supports "soft" deletes. Example:
    Client table has fields:
    id - primary key (number)
    name - varchar
    active ("Y" or "N" where "Y" means active and "N" means "INACTIVE")
    We also have a table Users:
    id - primary key (number)
    name - varchar
    active ("Y" or "N" where "Y" means active and "N" means "INACTIVE")
    When I delete a user I want to set its active field to "N" and then
    when
    someone reads users from the client (after I have saved my changes)I
    want
    only users whoses active field is "Y" to be returns, i.e.
    Client clientA = <read client A>
    Collection users = clientA.getUsers();
    Is there a way to configure/customize the mapping/relationship
    between
    objects?
    Thanks!
    Bruce
    Stephen Kim
    [email protected]
    SolarMetric, Inc.
    http://www.solarmetric.com

  • BP change documents ( linking problem between Object id and Business Partner)

    Hi,
    We need to create a report for documents changed for a Business partner.
    This will be done in sap bw.
    on source side I have created the datasource with function module changedocument_read and I am getting most of the information
    which I want. Only missing part is Business Partner number.
    Can somebody suggest , how I would be able to link Object Id to business partner.
    I need to pull everything that is changed at BP level and the Object class selection around 30 in number.
    So I am looking for any standard function module which can provide me the link between Object id and Business partner.
    If I establish the rules to determine the Business partner from Object id , its getting bit difficult.
    Can somebody please help/suggest.
    I have gone through many documents and scn posts but unable to find anything on this.
    Thanks !

    Hi, looking at the change history header table CDHDR it seems that object ID simple equals the internal format of the business partner number.

  • Message mapping - dependencies is disabled?

    Hi,gurus:
    In IR,message mapping ->dependencies,it was disabled.Can you tell me why?Thanks in advance.

    hi,
       if ur message mapping tab is disable this is bcoz of the jdk version being install.chk if it is greater than 1.4.2.x say jdk 1.5 or jdk 1.6.if so reinstall jdk 1.4.2. bcoz version 1.4.2.x creates probms like disabling of the message mapping tab in IR.
    Regards.
    Siddhesh Naik

  • Core Data Services in ABAP : No URI-Mapping defined for object type DDLS

    Hi ,
    When creating a DDL source , I get the error
    " No URI-Mapping defined for object type DDLS and object name ZCDSV_01_06".
    Can you please suggest what the issue could be?
    Thanks,
    Chakram Govindarajan

    Now I am able to proceed to the next step. Not sure how this started working. However, I get the below error when I open the DDL source editor for one particular ABAP system added in the eclipse environment. I however do not get the error when I open the DDL source editor for another system ( AH4) .I am providing the log error details . I updated the ADT installation. However the issue has not been resolved. Also I tried implementing the Note: 1834948. However I cannot find the option "Team -> Share project..." in the ABAP project.
    Thanks,
    Chakram Govindarajan

  • Copy and paste styles between objects and entire slides

    Hi,
    In Keynote 5 I was able to copy and paste styles between objects and even between entire slides.
    cmd+alt+c on one object (like a circle) and all its details like shadows, colors and animations could be transferred to another object.
    One could even do it with entire slides and transfer one animation style to all the other slides.
    THAT DOES NOT WORK ANYMORE.
    Does anybody else miss these features?
    Or is it just me?

    object animations tools are:
    copy animation:   Format > Copy Animation
    paste animation   Format > Paste Animation
         there are no keyboard short commands for these.
    There are no tools to copy or paste transitions between slides, you could duplicate the slide then add the content.

  • Gap between objects

    I know there are several threads about this but I haven't found a decent answer. I have a logo I'm working on with overlapping shapes, strokes, etc. Everything looks fine in Illustrator but when I export the file to show the client, whether it be a .png, .pdf, .jpg, there is a hairline gap between objects. Is this only a screen issue or will the hairline gap print?

    That's right, it's a screen issue. So printing the vector file will be fine.
    You have a problem is when you want to show a pixel version to a client.
    Place the AI file as a smart object in Photoshop
    See my answer here for a solution:
    Illustrator divide problem
    You can also skip the Photoshop route by using the Rasterise effect in Illustrator and export as .png, jpegs etc.

  • Sync maps bookmark between iPad and iPhone

    Hello
    I would like to sync maps bookmark between my iPad 2 and iPhone 4
    Is there a way to do that ?

    There is actually a way via contacts, but not a convenient one.
    You have to do it one by one for your existing bookmarks in Maps.
    You need a Mac to seperate those "bookmark contacts" from your regular contacts.
    I use this method now instead of the Maps bookmarks.
    0. Make the necessary setting to sync your contacts with iCloud on your iOS devices (and your Mac if you want to use a "bookmark group")
    1. Open a bookmark in Maps (or search for something) then click on the i-icon
    2. Choose to put it in a new Contact (modify info as you  like)
    3. Add item for Notes with the text "bookmark"
    This "bookmark contact" will now be synced through iCloud to your Mac and other iOS devices
    I don't want my contacts to be cluttered with those "bookmark contacts", so I choose to create a seperate group
    4. In addressbook on the Mac do a search for "bookmark"
    5. select file --> New group from selection
    6. after you've added additional "bookmark contacts" in Maps on your iPhone or iPad you have to search and select them and then drag them to your "bookmark group" in address book on the Mac

  • Differences Between Object And System Privileges

    Hi,
    Whats the difference between object and system privileges in oracle?
    Cheers
    Paul

    System Privileges
    A system privilege is the right to perform a particular action, or to perform an action on any schema objects of a particular type. For example, the privileges to create tablespaces and to delete the rows of any table in a database are system privileges.
    Schema Object Privileges
    A schema object privilege is a privilege or right to perform a particular action on a specific schema object:
    For example, the privilege to delete rows from the departments table is an object privilege.
    Some schema objects, such as clusters, indexes, triggers, and database links, do not have associated object privileges. Their use is controlled with system privileges. For example, to alter a cluster, a user must own the cluster or have the ALTER ANY CLUSTER system privilege.
    A schema object and its synonym are equivalent with respect to privileges. That is, the object privileges granted for a table, view, sequence, procedure, function, or package apply whether referencing the base object by name or using a synonym.
    Granting object privileges on a table, view, sequence, procedure, function, or package to a synonym for the object has the same effect as if no synonym were used. When a synonym is dropped, all grants for the underlying schema object remain in effect, even if the privileges were granted by specifying the dropped synonym.

  • Differences between object and object references

    What's the differences between object and object references? To me, it seems the same, but I am sure there are differences.
    Student s = new Student("Joe",20);
    s is an object of class Student. Can we say s is an object reference of class Student?
    Please clarify. thanks!!

    Student s = new Student("Joe",20);
    s is an object of class Student. Can we say s is an
    object reference of class Student?The thing you created via "new Student()" is an object. The variable you declared via "Student s" contains a reference to that object. People say all kinds of things but I find it clearer to differentiate between variables and the objects they refer to.

  • Relationship between Objects Not Found in PA

    Dear all,
    I have uploaded objects (Org Unit, Job, and Position) and the relationships between objects separately using LSMW.
    When i checked the update of the relationship between objects in PA30, but the relationship between objects (Org Unit, Job, and Position) did not exist, yet exists in PP02.
    I tried to upload the relationships between objects using holder (A008) in LSMW again, still I could not find the relationships in PA30, but exist in PP02.
    Then I tried to run rhinte00 and rhinte30 to link the relationship between objects. I managed to get through rhinte00, but failed to run rhinte30.
    Below is the report log when I tried to run rhinte30.
    Report log:   
    Processing mode:   Processing successful 
    Number of personnel nos. selected :   0 
    Personnel numbers with errors:

    Check the following.
    1. Check if integration is active in T77S0 table PLOGI PLOGI = Your active plan version & PLOGI ORGA = X
    2. Check if all your objects are created with this active plan version
    3. Check the feature PLOGI to see if your PA PSA etc for the employee are integrated.
    cheers
    Ajay

  • White Space between Objects?

    Alright,
    I seem to be having a problem to where there is white space between objects and no matter how many times I intersect paths I still have white-space between objects. Obviously if you are making some sort of illustration, even a pixel worth of white space could prove to be problematic. I have provided a screenshot of the problem I am receiving. I cannot move the objects together to fix this problem. May anyone please offer advice or a solution to this issue?
    As you can see in the screenshot we are seeing white space between the blue and purple objects.
    Any help would be greatly appreciated!
    Thank you all so much!
    Aaron

    Thanks for this reply dougofakkad. This answer lead me to find what I was looking for...
    This question and it's answers go over the problem:
    http://forums.adobe.com/thread/845303
    This blog post answers the problem:
    http://www.sarasjodin.com/2013/06/place-objects-exactly-illustrator/
    Thank you so much!

Maybe you are looking for

  • Report F150 Dunning

    Experts i am looking for a report which shows how many dunning letters and levels a customer has received over a period of time. Is there any T-code or SAP tables which i can use for my reporting? thank you!!

  • User gets "This network connection does not exist" when she tries to log on to Terminal Server (2008 R2)

    User gets "This network connection does not exist" when she tryes to log on to Terminal Server (2008 R2) I got more than 100 users. Shes the only one getting is. We tried four computers (All Windows 7 Pro) Nothing useful in event viewer to mention.

  • Clearing GR/IR Account Matched Items

    Hi all, I'm trying to clear some GR/IR Accounts in F.13, and I'm getting some errors.  Error Log: Consolidated companies 2000 and ' ' are different.  I believe that there is more than one trading partner hitting the same gl account. Any suggestions??

  • I don't have a Mac or PC so how do I put music on my iPod from my iPad?

    I received an iPad Air for Christmas and just recently bought an iPod nano (the newest generation) under the impression that I can use my iPad to sync music onto my iPod. I am struggling to figure out how to do this. Everything I have read has said t

  • Custom template available across multiple site collections

    I have created a custom site template which I need to be available across multiple site collections. Is there a global area where I can put the .wsp file so that I can use it within any site collection. I also have a custom document library which I n