Custom queries

Hi,
I have an existing business entity interface hierarchy that I have mapped, let's call it IAnimal, with subclasses, for example, of IDog and ICat
These entities are maintained within a logical repository structure (i.e. a folder hierarchy). I want to perform paged querying, with the order based upon the repository folder structure full path name.
I can use Oracle features to do the hierarchical query, and have custom application code to handle the paging: provided I can query the business entity AND it's repository folder full path name in one hit.
Is there a mapping that support's this?
Ideally I would have a new concrete type, something like IAnimalSearchResult that contains two attributes, an[i] IAnimal reference and a simple String field representing the full path....
So querying on[i] IAnimalSearchResult would return all IAnimals (and sub types thereof), as well as its location in the repository.
Can I map "Container/Delegated attributes" like this?
Can I map my dynamically generated query result to a class attribute?
Thanks
Mike

First, yes the default queries for an attribute mapping can be overridden with custom queries.
collectionMapping.setSelectionQuery(customReadAllQuery);
However given that this mapping would need to be readonly I would recommend having the getter in your application simply execute the TopLink query to retreive the results. The only benefit to mapping would be to make use of the TopLink's refresh functionality.
--Gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Writing Custom Queries (Logical SQL to Physical SQL)

    What is the recommended method for writing cross-subject area custom queries against the HCM database? Is there a published data model available for reference?

    Hi Experts,
    Please help on this.

  • Are custom queries supported in BOXI R2

    Are custom queries supported in BO XI R2.
    What are the possible issues that may come up when a BO 6.5 report with custom query is migrated to BO XI R2.

    If you are working with BOE and .NET, please post the query to the ".NET Development - BusinessObjects Enterprise forum:
    .NET SDK Application Development
    If you are working within BOE, please post this query to the Business Objects Enterprise Administration forum:
    BI Platform
    That forum is monitored by qualified technicians and you will get a faster response there. Also, all BOE queries remain in one place and thus can be easily searched in one place.
    Thank you for your understanding,
    Ludek

  • Export - custom queries and reports, and security profiles

    We would like to keep a copy of our customizations to the application. 
    There are ways to import queries, reports and profiles into the app.  Is there any way to export the following to something like a CSV file for the following:
    - custom queries (all tabs)
    - custom reports (all tabs)
    - security profiles (custom and out of box u2013 all access rights)
    Thanks,
    Jerry

    Jerry,
    There are no standard queries that extract security profiles, Query Groups, Reports or Query Defintiions from the system. 
    However you can build custom queries that support this functionality.  During an implementation project I created some custom queries which allowed you to extract these objects for documenting purposes  We likely could supply these to you through SAP Consulting.  Please reach out to your SAP rep and have them Contact Me.  I have created some instruction that explain how to create these.
    Regards,
    James

  • Creation Of Custom Queries of Execution Type Java.

    Hi All ,
    I want to know if I can create Custom queries of Execution type java which have Query Executor class.
    I got this requirement because I got to customize "Search Master Agreements and Agreements".
    It seems like it's not possible as Query Executor Class is uneditable so no chance of deploying any class file in server and trying out the ways...
    Any approach exists to customize these type of queries.?
    Regards,
    Uday

    Hi
    I understand your requirement is to customize Search Master Agreements and Agreements query and display the new custom report in the Contract Management dropdown on workbench along with other queries.
    This could be achieved by duplicating original query  i.e.Search Master Agreements and Agreements, customize and save it, go to Query Group in set up, identify  and open the query group containing the original query and add the new customized query as query reference.Also don't forget to remove the original query from the query list.
    Regards
    Mudit Saini

  • Run custom queries in Enjoy transactions

    Hi
    I have replaced the standard queries in the 'Document Overview' of some MM transactions (i.e. ME21N, ME22N, ME23N) using SAP enhancement 'MEQUERY1'. But, some standard queries such as 'My Purchase Orders' are able to fill automatically fields of the selection screen and run.
    Is it possible to reproduce this feature with custom queries ?
    Thanks,
    Florian

    Moderator message - this is wrong on so many levels, I don't know where to begin, Maybe someone can help me.
    Rob

  • How tosend parameters to custom queries that are called by toplik afterload

    i want to write some custom sql that used to map some of the attributes in my class, where i need to send parameters to filter the data, how can i send the parameters to the queries that are called by the toplink afterload method.
    is there a way, we can send parameters to the toplink afterload method.

    You can pass parameters to a VI that you start with the invoke node. You use the method Set Control Value [Variant] (or just Set Control Value). You specify the control name and pass it a value.

  • CS-MARS Issue - Custom queries/reports are not displaying any data

    I am trying to produce a report to identify which clients are TFTPing traffic to a particular host and then quantify the amount of data being transmitted. These statistics should be available via the Netflow data being exported to the CS-MARS System. However, the queries continuely produce nil results.

    These release notes are for use with the Cisco Security Monitoring, Analysis, and Response System (CS-MARS), Version 4.1.1 running on either a Local Controller or on a Global Controller.
    http://www.cisco.com/en/US/products/ps6241/prod_release_note09186a0080504531.html

  • Custom queries in CMP beans?

    Hi everyone,
    I need to keep my beans in a tree-like structure...
    Therefore I need to associate each bean with a path, such as "root.child.child". I would like to implement this method:
    public Collection findByParent(String parent)
          throws FinderException, RemoteException;using this query:
    SELECT primkey FROM {table} WHERE LOCATE(?, path) >= 0;
    How could I make the EJB container send use this query? I use Orion, so I guess it should be possible to enter this query into orion-ejb-jar.xml, but I'm not sure how. I do NOT want to make the bean BMP!
    I would also like to implement a search method. How can I do that?
    Thanks in advance,
    Nille

    You can use EJBQL to execute the query, if you are using ejb2.0. In your ejb-jar.xml you will need to add the query you want to execute something similar to:
    <query>
    <query-method>
    <method-name>findByParent</method-name>
    <method-params>
    <method-param>String</method-param>
    </method-params>
    </query-method>
    <ejb-ql>SELECT OBJECT(b) FROM YourBean b WHERE b.path LIKE '?1%'</ejb-ql>
    </query>
    This tag goes after the <primkey-field> inside your beans <entity> tag.
    You also need to add the method signiture to your home interface.
    public Collection findByParent(String parent) throws FinderException, RemoteException;
    And this method should return a Collection of Bean instances.
    Hope this helps
    Jeremy

  • Report based on custom Query - Question about Data Source

    Hello,
    I am trying to create Crystal reports (EBO R3.1, Oracle 11g Database, CR2008) based on custom queries. Tried using different kinds of Data Sources but getting stuck once I export them to Infoview.
    1. Using Oracle Server: This method works fine on my local & Infoview. But since I have lot of reports, I do not want the DB username/password associated to the report. I neither want BO to prompt username/pwd to my user.
    2. Using ODBC(RDO):
    Again, works fine on my local. Once I export to Infoview, it fails with this error: "Failed to open the connection"
    Which makes sense, because the DSN is created on my local machine and not on the server.
    How and what do I create on the server, so that the reports run?
    I do not know if using ODBC(RDO) is even the right way for creating custom SQL reports.
    I have been reading about Business Views, but not clear on how good they work.
    My goal is to create multiple reports, using custom SQL queries which use some kind of connection to the database that can be managed on the
    server in one place, and used by multiple reports.
    Can any of you please help me here
    Thanks,
    Sowmya.
    Edited by: SBat22 on Apr 13, 2011 5:58 PM

    Thanks for moving it to the right forum!!
    But, if I setup in CMC, a default username/password that the report needs....what would happen if my password changes?
    I would need to go to each and every report and update the password.
    I am looking for using one common "connection" for multiple reports. So that, when passwords change, all I update is in one central location.
    Can anyone please help!
    Thanks,
    Sowmya.

  • Best Practice on Creating Queries in Production

    We are a fairly new BI installation. I'm interested in the approach other installations take to creation of queries in the production environment. Is it standard to create most queries directly into the production system? Or is it standard to develop the queries in the development system and transport them through to production?

    Hi,
    Best practices applied to all developments whether it is R/3, BI modelling or Reporting and as per the best practice we do development in Development system, testing in testing box and finally deploy successful development to production. yes for user analysis purpose, user can do adhoc analysis or in some scenario they create user specific custom queries (sometimes reffere as X-query created by super user).
    So it is always to do all yr developement in Development Box and then transport to Production after successful QA testing.
    Dev

  • SCCM Custom Query

    Hello,
    I am looking for a 2007 SCCM custom query that will look for KB2964358 installed. My trouble lies when I specify the below query to see if an update is installed, and it only returns XP computers since it is looking for the ADD Remove Programs feature.
    ConfigMgr is not collecting the list of Software Updates (patches) for Window 7/Vista/ 2008/ 2008 Core operating systems. Because, on these operating systems this information is stored
    in “Win32_QuickFixEngineering”  WMI class (it’s not listed in Add Remove Programs) and the inventory of this class is NOT enabled in SMS_DEF.MOF (by def ault). Hence ConfigMgr. report won’t be able to provide these details unless and until you’ve enabled
    the appropriate WMI class in SMS_DEF.MOF. Is there any other way to look for an update installed in custom queries that will return Windows 7 machines as well?
    SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID
    = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%KB2964358%"

    Hi,
    take a look at the article below to extend the SMS_DEF.mof file to include the WMI class.
    http://technet.microsoft.com/en-us/library/cc180866.aspx
    Blog: http://theinfraguys.com
    Follow me at Facebook
    The Infra Guys Facebook Page
    Please remember to click Mark as Answer on the answer if it helps you in anyway

  • Custom Transaction codes overwritten during transports

    Hi,
    When I create custom queries in my production client, assign transaction codes to them, and assign them to roles they get overwritten every time I perform a transport for those roles. We are still at an early stage of implementation and there are still some daily authorization changes that require a transport from test to production. When the roles are transported it wipes all my reports (transaction codes) assigned to these roles in the production system. Is there a way to perform a transport without wiping out the customizations made to the role in the production system like these?
    Thank you,
    Sergiy

    The answer is in the way one works with BI (or BW).
    If the design is that queries are to be created in production (which is often used). As far as i know the only exception on the rule that everything should be build in DEV. And this is the only good way as you do not want end-users to work in DEV. There are some things to know about the way SAP works.
    If a role is changed in DEV and transported to PROD all queries assigned to the role in PROD will be disconnected.
    Solution a role to be used in PROD were queries will be assigned to should never be transported again.
    Solution in detail, there should be roles for different use:
    1.     Access to Info providers in version read and write.
    2.     Access to publish reports in roles per query role.
    3.     Query/Menu roles per info area.
    Roles 1 and 2 allow for access and can be transported as often as you want. Role 3 is only to be used as a container of queries to be used by end users and should NEVER be transported again (best practice is to delete if in DEV after transport and NOT assign it to a transport before deletion).
    In the publisher role it can be arranged to which role(s) the publisher can assign reports. It is also possible to force users to use a report naming convention in this role.

  • Parameterized custom mappings?

    Hi all,
    Is there a way to define custom mappings which are implemented by a parameterized query, the parameter of which can be set at runtime?
    I know that there are transformation mappings, and that you can implement your own custom queries to realize mappings, but there is no way to send a parameter value from the application to the query at runtime. The parameters are either limited to the database fields which are already involved in the mapping (in the case of custom query for mapping), or must be extracted from the object context of the mapping (in the case of transformation mapping).
    I also know that you can define a "Map" instance as the collection type for a one-to-many or many-to-many mapping, but afaik this involves loading the whole set into the session before an object can be queried by key, even if transparent indirection through the "IndirectMap" interface is in place...
    What I am looking for is a kind of ValueHolder that can take parameters which define the value loaded into the ValueHolder.
    Is there a way to do this?
    What I want to implement is the following scenario:
    A class "Organization" contains a method "User getUser(String login)". The parameterized getUser operation should be implemented cleanly with a TopLink mapping, not through an external ReadObjectQuery, since the session context of the operation is not known at implementation time and should be managed by TopLink, in the same way as other pre-defined mappings are.
    Any ideas?
    Thanks,
    Mirko
    Message was edited by:
    jRipple

    Since nobody else seems to have a solution, i at least want to explain the approach I followed now to solve the problem, but it isn't a clean one...
    I defined a "Map" collection property and put a TransformationMapping on it. The buildAttributeValue oft the mapping is implemented to return a homemade "Map" implementation which uses the session given to it from the buildAttributeValue "session" argument to retrieve the specific value mapped to a key via a ReadObjectQuery whenever Map.get(Object key) is called.
    This basically works in my application, but I wouldn't suggest to completely rely on that carelessly, because the session given on Map construction might have become invalid some time after the attribute value has been built and before an object ist retrieved via Map.get(). An ordinary one-to-many collection mapping would still work in this case, since the whole collection is already loaded into memory. My own collection, however, would throw an exception, since it uses an invalid session object to execute a query on.
    TopLink seems to have a design principle saying that persistent objects never should hold a reference to the session they are registered in, but this principle is violated by my solution...

  • Ticket support system raising better customer support for ecommerce

    Customers will want to know more about your business and purchase your product. Most Internet marketers and business owners believe that having a ticket system helps in managing customers and support.
    By raising support ticket system,customer service team can locate the status of customer queries each time, immediately whenever they want. It is a logical and organized approach towards problem management and troubleshooting. It is ability to view & support tickets, support multiple language,synchor emails and tickets, updation and tracking of tickets, customized click sidebar, a variety of inquiry forms to choose from, FAQ knowledge base, and intelligent reports. Besides,support ticket software are usually equipped to manage groups of operators working on a huge volume of customer requests.
    The fact of the matter is that this system can save a lot of time and money of your company. If the customer faces any problem, you have to be equally adept in handling such situations. Here recommend iKode Helpdesk for 30 Days Free Trial!

    Most likely an IT ticket system, where people create tickets
    when a problem arises, and the IT tech/dept receives the ticket and
    reacts appropriately.
    I do not know of a pre-made system like this, however it
    would take little programming to set this up. Build it into a web
    app for easy company distribution. Then create a form that inputs
    the user's name, department, and problem. If able, use CFMAIL to
    notify your tech team when a ticket has been filed. Else, you will
    have to keep a meta refresh page querying from a ticket database to
    show new tickets in realtime.
    We do this at my agency and CFMAIL has been very useful. We
    get a somewhat large volume of support calls from unplugged cables,
    printer toner changes, to broken apps. The ticket system allows us
    to better manage the immediate problems from the ones that can
    wait. We still take urgent support by phone because sometimes,
    email just isn't fast enough! :)

Maybe you are looking for

  • Schedule creation of material - MM11

    What is the use of schedule creation of material - MM11. In what specific need we use schedule creation of material and in which way this get differs from MM01. - David Boon

  • Modify Ztable using ITAB

    SORT gt_tabsum.   DESCRIBE TABLE gt_tabsum LINES gv_tabsum_entries.   MODIFY ztabsum FROM TABLE gt_tabsum. IF SY_SUBRC = 0. COMMIT WORK. ENDIF. Do i have any problem with my modify statement? The issue is - the number of entries in internal table gv_

  • Isatap Adapter & Teredo Tunneling Adapter fault

    When I run my housekeeping I always have code 10 faults on the Isatap Adapter and the Teredo Tunneling Adapter. I am not sure what these do and it dosen't appear to have any effect on my laptop. Can anyone explain what these adapters do.

  • Smartform problem urgent

    When printing a performance review if a bullet point or number is used can a new line be created in smartforms. what is the option for it. i will award ur effort.

  • Can't update pacman.

    I have a strange problem. I haven't updated Arch since sometimes in January, and today when I tried to it asked me to update pacman first. I said yes, and got this: sudo pacman -Syu Password: :: Synchronizing package databases... core is up to date e