Map implementation vs. map reference query

Hello all and Happy New Year.
I've written a Map implementation to store and retrieve values for a a class that needs to hold 80,00+ entries; performance is an issue, especially since it's a bucketed map with multiple values mapping to one key. everything worked as planned, but it was abysmally slow... after reading a bit on container performance for inspiration, I'm become a bit unclear as to whether I should really implement the class as a Map at all, or whether it makes more sense to just use one of Sun's implementations (like LinkedHashMap, for eg) and simply include it as a reference in the class. Nearly half of the reference material alluded to the latter case, which I didn't expect at all.
the question that's bothering me is this: when is a Map implementation preferable to a static reference, when I can just create a variable of type Map<String, List<String>> and use the entry set to do all of the work, since I really don't need to modify the method implementations? Is there a performance benefit, or is it just a matter of principle?
Thanks in advance for your input.
Melissa
____________________________

jverd wrote:Dude, your question makes less than zero sense.how sad. maybe thiis will help...
public class DuhReference {
Map<Duh1, Duh2> duhImAReference = new HashMap<Duh1, Duh2>();
vs.
public class DuhImplementation<K, V>  implements Map<K, V> {
//duh... gee, I guess this is the implementation then...
}Hope that helps. "Dude".

Similar Messages

  • I have SSRS parametarized report in that one data set have repeated values with query parameter . but while am mapping that query parameter to report parameter i need to pass distinct values. How can i resolve this

    I have SSRS parametarized report in that one data set have repeated values with query parameter . but while am mapping that query
    parameter to report parameter i need to pass distinct values. How can i resolve this

    Hi nancharaiah,
    If I understand correctly, you want to pass distinct values to report parameter. In Reporting Service, there are only three methods for parameter's Available Values:
    None
    Specify values
    Get values from a query
    If we utilize the third option that get values from a dataset query, then the all available values are from the returns of the dataset. So if we want to pass distinct values from a dataset, we need to make the dataset returns distinct values. The following
    sample is for your reference:
    Select distinct field_name  from table_name
    If you have any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Preview of Journal Entry - G/L effect , GL Mapping reference

    Hi All,
    I have observed that due to non availability of preview of Journal Entry - G/L effect, there are chances that customer/users come to know of wrong G/L Mapping after the posting of transaction.
    If an option to preview the G/L effects before adding a transaction e.g. A/R Invoice,Sales Delivery etc... is available than the customer/user can rectify the G/L Mapping or the G/L selection at the transaction level.
    Also if one column say GL mapping reference can be added in Journal Entry, the purpose is to store infromation from where the SAP B1 has picked up the GL e.g. from GL increase , GL deccrease , Price Difference from Item Group,Ware House,Item Level GL Mapping.
    Best Regards,
    Samir Gandhi
    Edited by: Samir Gandhi on Apr 22, 2009 7:30 PM

    Dear Peter Dominik,
    I think it is good to show the to be Journal entry effect on click on Add botton, this way user will not have to take additional pain click on preview button to see the JE, but for all cases every user will have to forcefully see the JE screen and confirm that it is OK, and he/she will not be able to change it.
    BR
    Samir Gandhi

  • How to map a query with the Multiprovider?

    Hello All,
    Can any one please tell me how to map a query with a multiprovider?
    Appreciate your help.
    Regards,
    Soumya.

    Hi,
    Can you please elaborate , do you mean how to create a query with multiprovider. if that is your question it is very simple just create the query on the multiprovider.
    What is the purpose for mapping the query with multiprovider

  • Can we implement the custom sql query in CR for joining the two tables

    Hi All,
    Is there anyway to implement the custom sql query in CR for joining the two tables?
    My requirement here is I need to write sql logics for joining the two tables...
    Thanks,
    Gana

    In the Database Expert, expand the Create New Connection folder and browse the subfolders to locate your data source.
    Log on to your data source if necessary.
    Under your data source, double-click the Add Command node.
    In the Add Command to Report dialog box, enter an appropriate query/command for the data source you have opened.
    For example:
    SELECT
        Customer.`Customer ID`,
        Customer.`Customer Name`,
        Customer.`Last Year's Sales`,
        Customer.`Region`,
        Customer.`Country`,
        Orders.`Order Amount`,
        Orders.`Customer ID`,
        Orders.`Order Date`
    FROM
        Customer Customer INNER JOIN Orders Orders ON
            Customer.`Customer ID` = Orders.`Customer ID`
    WHERE
        (Customer.`Country` = 'USA' OR
        Customer.`Country` = 'Canada') AND
        Customer.`Last Year's Sales` < 10000.
    ORDER BY
        Customer.`Country` ASC,
        Customer.`Region` ASC
    Note: The use of double or single quotes (and other SQL syntax) is determined by the database driver used by your report. You must, however, manually add the quotes and other elements of the syntax as you create the command.
    Optionally, you can create a parameter for your command by clicking Create and entering information in the Command Parameter dialog box.
    For more information about creating parameters, see To create a parameter for a command object.
    Click OK.
    You are returned to the Report Designer. In the Field Explorer, under Database Fields, a Command table appears listing the database fields you specified.
    Note:
    To construct the virtual table from your Command, the command must be executed once. If the command has parameters, you will be prompted to enter values for each one.
    By default, your command is called Command. You can change its alias by selecting it and pressing F2.

  • How to implement fuzzy search in Query variables

    Dear Experts,
    Fuzzy search is eazy implemented in the abap  , but I do not know how to implement fuzzy search in Query variables
    our company have  a report,with input variable of customer code,   the user want to input 3 bits as fuzzy search. for example,
    the customer code  have 10 bit,  she want to only  input 3 bits before-- EAE *
    and hope the results will  be displayed.  if you have any solution , please advise. 
    ManyTthanks.
    Best Regards.
    Steve

    closed

  • Mapping and querying Custom Objects for a Contact with REST Api

    Hello All,
    We are hoping to get some details on managing DataCard set through REST APIs. Our implementation goal is to create Contacts and add Custom object for each Contact, or to be precise, add a DataCard Set for each Contact.
    At the moment, to associate a DataCard Set (or Custom Object) to an existing contact, we are supplying following custom object fields during creation of Custom Object:
    new CustomObjectField 
                                                                    name = "MappedEntityType",
                                                                    dataType = Enum.GetName(typeof(DataType), DataType.numeric),
                                                                    type = "CustomObjectField",
                                                                    defaultValue = "0"
                                                             new CustomObjectField
                                                                    name = "MappedEntityID",
                                                                    dataType = Enum.GetName(typeof(DataType), DataType.numeric),
                                                                    type = "CustomObjectField",
                                                                    defaultValue = "<ContactId>"
    Is this the correct approach? This is Based on the information provided here: http://topliners.eloqua.com/community/code_it/blog/2012/05/31/eloqua-api-how-to-mapping-a-data-card-to-an-entity.
    Would the REST API allow us to query the CustomObjects using the MappedEntityId value for later updates? If so, any pointers on how we approach that?
    Thanks in ad.

    Either the MappedEntityID field is not available or I do it wrong, Eloqua is ignoring the field and does not map the custom record with the unique Contact ID
    {"type":"CustomObjectData","ContactID":"8829509","fieldValues":[{"id":"195","value":"[email protected]"},{"id":"220","value":"a0KJ000000387QvMAI"},{"id":"191","value":"001J000001OrL77IAF"},{"id":"193","value":"NowTV MPP"},{"id":"194","value":"8829509"},{"id":"196","value":"Andreas"},{"id":"197","value":"Wolf"},{"id":"198","value":"003J00000145lkBIAQ"},{"id":"210","value":"777666555"},{"id":"199","value":"gbp"},{"id":"200","value":"0"},{"id":"215","value":"0"},{"id":"201","value":"999111999"},{"id":"214","value":"111111"},{"id":"202","value":"222222"},{"id":"204","value":"now"},{"id":"203","value":"xmas"},{"id":"205","value":"no description"},{"id":"206","value":"test"},{"id":"218","value":"holidays"},{"id":"219","value":"PPV-0878545"},{"id":"213","value":"N"},{"id":"212","value":"myself"},{"id":"209","value":"now tv"},{"id":"192","value":"1417542120"},{"id":"207","value":"1417542120"},{"id":"216","value":"1417542240"},{"id":"217","value":"1417542240"},{"id":"211","value":"1417542240"}]},"MappedEntityID":"003J00000145lkBIAQ"}
    Response
    DEBUG|Response------{"type":"CustomObjectData","id":"81720","fieldValues":[{"id":"195","value":"[email protected]"},{"id":"220","value":"a0KJ000000387QvMAI"},{"id":"191","value":"001J000001OrL77IAF"},{"id":"193","value":"NowTV MPP"},{"id":"194","value":"8829509"},{"id":"196","value":"Andreas"},{"id":"197","value":"Wolf"},{"id":"198","value":"003J00000145lkBIAQ"},{"id":"210","value":"777666555"},{"id":"199","value":"gbp"},{"id":"200","value":"0"},{"id":"215","value":"0"},{"id":"201","value":"999111999"},{"id":"214","value":"111111"},{"id":"202","value":"222222"},{"id":"204","value":"now"},{"id":"203","value":"xmas"},{"id":"205","value":"no description"},{"id":"206","value":"test"},{"id":"218","value":"holidays"},{"id":"219","value":"PPV-0878545"},{"id":"213","value":"N"},{"id":"212","value":"myself"},{"id":"209","value":"now tv"},{"id":"192","value":"1417542120"},{"id":"207","value":"1417542120"},{"id":"216","value":"1417542240"},{"id":"217","value":"1417542240"},{"id":"211","value":"1417542240"}]}
    Eloqua:
    Name: PPV-0878545
    Unique Code: a0KJ000000387QvMAI
    Status Registered
    Created Date 12/22/2014 12:44:49 PM
    Mapped NO
    Any Idea how to map this to a contact
    Entity Type is Contacts
    Entity Field is SFDC Contact ID

  • Map reference to list

    can a map entry in a workflow to a variable updates: have a reference to a list which is dynamically generated depending on a form inside the same workflow.
    the entire scenario can be better described as....
    Every admin is able to access a form when he launchges a workflow....
    Inside the workflow there are updates which iterates on a list of users...
    i want this updates which has a <map> of 4 attributes.... which needs to be grabbed from a list which is generated by a rule in the background.
    Thanks
    Nsankar1d

    Look what I've done now in order to get this work but with not succes.
    I changed my value's map to a classe of ValueContent like this Map<String,ValueContent> and in the view side I did this
    <p:inputText value="#{searchBean.searchParameterValues[p.sigla].valueContent.iniValue}"/>
    My ValueContent is
    class ValueContent implements Serializeble {
    private String iniValue;
              private String endValue;
              public ValueContent() {
    // getters and setters...
    And now I getting this error
    javax.el.PropertyNotFoundException: /pages/portal/searcharea.xhtml @108,102 value="#{searchBean.searchParameterValues[p.sigla].valueContent.iniValue}": Property 'valueContent' not found on type br.com.agens.titanium.ui.bean.SearchBean$ValueContent

  • Help needed in mapping BI query output to use as input for BAPI

    Hi,
    After wrestling with it for quite some time I choose to ask yet another question here. I want to use the output of a BI query I use as input for a BAPI. I just can not get the mapping correctly:
    The query delivers: 104908BA092F7501F5E1008000829000AC
    I need: 104908BA092F7501F5E1008000829000AC
    How can I lose the two first digits? Thanks in advance!
    Best regards,
    Jan

    Nevermind. I found out myself. I am now using the statement MID(@GUID,2,32) in the connection.

  • Horizontal mapping and query limitation

    Hi guys,
    Suppose that we have the following inheritance structure:
    Class: LegalEntity
    Field: LegalEntity relatedTo
    Field: String name
    Class: Person extends LegalEntity
    Field: String ssn
    Class: Corporation extends LegalEntity
    Field: String location
    Class: CollegeStudent extends Person
    Field: String school
    Class: Employee extends Person
    Field: Corporation company
    If a flat mapping is used throughout, then we end up with one table
    (LEGALENTITY) with the columns: relatedTo, name, ssn, location, school,
    and company, plus the Kodo created jdo columns.
    If we wanted to create several tables, we could map LegalEntity and
    Person horizontally, making the base tables COLLEGESTUDENT, EMPLOYEE,
    and CORPORATION.
    If I understand section 7.6.4.3 correctly, the value stored in the
    relatedto column will be a stringified object identity, and Kodo does
    does not support queries across this relation. Thus, the query find all
    CollegeStudent objects that satisfies the filter "relatedTo.name ==
    \"Sally\"" is not supported.
    Did I understand that correctly?
    If so, why does this limitation exist?
    David

    David-
    Did I understand that correctly?You are correct.
    If so, why does this limitation exist?It is because a proper relation cannot exist in the database if the
    target table is unknown (which it is for horizontally mapped classes),
    and joins would become tremendously complex or, in some cases, simply
    impossible to accomplish with a single SQL statement.
    We are considering adding some support for querying across horizontal
    relations that are using non-composite primary keys, but it is currently
    not possible.
    In article <d3eig3$ssb$[email protected]>, David Ezzio wrote:
    Hi guys,
    Suppose that we have the following inheritance structure:
    Class: LegalEntity
    Field: LegalEntity relatedTo
    Field: String name
    Class: Person extends LegalEntity
    Field: String ssn
    Class: Corporation extends LegalEntity
    Field: String location
    Class: CollegeStudent extends Person
    Field: String school
    Class: Employee extends Person
    Field: Corporation company
    If a flat mapping is used throughout, then we end up with one table
    (LEGALENTITY) with the columns: relatedTo, name, ssn, location, school,
    and company, plus the Kodo created jdo columns.
    If we wanted to create several tables, we could map LegalEntity and
    Person horizontally, making the base tables COLLEGESTUDENT, EMPLOYEE,
    and CORPORATION.
    If I understand section 7.6.4.3 correctly, the value stored in the
    relatedto column will be a stringified object identity, and Kodo does
    does not support queries across this relation. Thus, the query find all
    CollegeStudent objects that satisfies the filter "relatedTo.name ==
    \"Sally\"" is not supported.
    Did I understand that correctly?
    If so, why does this limitation exist?
    David
    Marc Prud'hommeaux
    SolarMetric Inc.

  • Map Viewer Query Rewriting for Dynamic themes and  Materialized Views.

    Hi,
    I am usng a WMS request to render FOI points in my map.
    Internally query rewrite is happening in Mapviewer for this dynamic theme and my data points query is getting converted as
    select FROM
    ( select status, shape from MatView.MyTab where id = '3' )
    WHERE MDSYS.SDO_FILTER(shape, MDSYS.SDO_GEOMETRY(2003, 4283, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), MDSYS.SDO_ORDINATE_ARRAY(144.948120117188,-37.8162934802451,144.950866699219,-37.8141237016045)), 'querytype=WINDOW') = 'TRUE'
    here the rewritten query is not correct and is throwing exceptions in mapviewer log
    How can I make this query to be written correctly.
    (My orginal query before rewrite is: select status,shape from MatView.MyTab where id='3' )
    I am using a materialised view : MatView is a materialized view.
    When I used normal tables, the query is re written correctly.But for this materialized view this is happening.
    How can I correct the error?
    Is this has something to do with some Spatial Indexing in Materialised view or Query Rewriting for materialized view?
    Edited by: 841309 on Mar 10, 2011 11:04 PM

    Oops!
    The Materialized view was not accessible from the schema I tried :)
    And so when I gave permissions,it formed the correct query.
    So if permission is not there,map viewer will rewrite the query in a wrong way! New information.

  • Basic question: Can OID map LDAP query to custom SQL query?

    Hi all,
    I have custom data in my Oracle Database and I wat to give them
    LDAP interface. Is it possible to use OID to achieve this or OID
    is for other purposes?
    To be more specific: I have schema MYSCHEMA and table
    MYSCHEMA.MYTABLE. Is it possible to configure OID to select from MYSCHEMA.MYTABLE for specific LDAP queries? And the same for update queries? Is there some OID manager console to map LDAP queries against Oracle tables and views?
    Thanx for any suggestions,
    Rob

    Rob,
    take a look at the Directory Integration Platform. We provide synchronization of data from an DB tables to OID.
    see "Synchronization with Relational Database Tables" http://download-west.oracle.com/docs/cd/B14099_14/idmanage.1012/b14085/odip_db.htm#i1042820
    another option could be to use the OID Plugin framework together with a PLSQL procedure to access the DB data
    http://download-west.oracle.com/docs/cd/B14099_14/idmanage.1012/b14087/svrplgin.htm#i741028
    regards,
    --Olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Mapped Drives Query SCCM 2012

    So in 2007 I extended the Sms Def MOF file and added a few lines so that mapped drives could be captured in hardware inventory. (Using the Datashift)
    I don't know how to do this in 2012 since for one the sms_def.mof file isn't used (its just the configuration.mof file) and I also can't find the correct items when I look at the hardware inventory in the client settings and click on "Set Classes".
    Please help.

    This video should help you out..
    http://youtu.be/E87Nc5xf7Sc
    http://www.enhansoft.com/

  • How to implement enter and execute query in ADF

    I am new to ADF and I am trying to create a simple data entry screen in ADF 11g based on a database table. I am looking to implement the equivalent of the Enter Query and Execute Query feature in Oracle Forms. I tried the default operations that are available with the data controls. But they don't seem to have this feature. Can someone help me / point me to how this can be implemented.
    Thanks,
    Srini.

    Thanks Shay. As per your suggestion I have included the Find and Execute buttons for the VO Object and ran the page. I first clicked the Find button and entered by query condition and then clicked the Execute button. At this point I get an error popup asking me to enter values for all the mandatory fields. Am I missing something?
    Regards,
    Srini.

  • Implementing History types on query based view object attributes

    Hi All,
    I have to implement the history types
    created on,
    created by,
    modified on,
    modified by
    in my application, but I have all the Query based view objects in my work space, but according to my research History types can only be implemented on the Entity Objects attributes. So how can I do this for my application ? Any Solution ? Any alternative  please ?
    (NOTE: I have all the entity objects available in my common Model work space ).

    @TimoHahn, I have the following master view object query, which i can not generate by using the Entity objects, Basically I am transforming an oracle form base ERP into Oracle ADF application, so I have available all the quries , Please let me know if i can have any alternative solution ?
    SELECT  NVL(A.STYP,0) STYP,A.DAT,C.BATNO,C.ITST, B.DEMNO,B.ITEM,LTRIM(RTRIM(D.ITEMNAME))ITEM_NAME,0 TRINQ,D.UOM ABRV,P.DAT DDAT,
        A.CSNO,PARTY,NVL(CSRAT,0)+(NVL(CSRAT,0)*NVL(B.GST,0))/100 GSTCSRAT,CSRAT,
        A.PDAYS DAYS, DECODE(C.CSTERM,1,'CASH',2,'CREDIT',3,'DD',4,'PAY ORDER',5,'ADVANCE%',6,'CHEQUE') ,B.GST,E.MASTDS PNAME,NVL(SUM(B.RQTY),0)DRQTY,DEPT.SEC_NAME DEPTDS,SUM(STOK.QTY) BAL,P.TRNO,C.EBY, C.SYSIP, C.TDAT
                  FROM ACCSTORE.STAC_CSM A, ACCSTORE.STAC_CSD B,ACCSTORE.ST_STAC_DEM_APRVD C,ACCSTORE.VITEMS D, ACC_MAST E,ACCSTORE.PRE_DEMANDM P,ACCSTORE.VSECTIONS DEPT,
                  (SELECT STYP,ITEMID,SUM(BALANCE) QTY FROM ACCSTORE.VITEMSTOCK GROUP BY STYP,ITEMID) STOK
                  WHERE A.CSNO=B.CSNO AND B.CSNO=C.CSNO AND B.DEMNO=C.DEMNO AND B.ITEM=C.ITEM AND B.STYP=C.STYP  AND C.PDEMNO=P.TRNO(+) AND P.DEPT=DIVNO AND P.SEC_NO=DEPT.SECNO(+)
                              AND C.STYP=STOK.STYP AND C.ITEM=STOK.ITEMID
                    AND C.STYP=D.STYP AND C.ITEM=D.ITEMID AND C.PARTY=E.MASTCD  AND B.APP=1 AND NVL(C.PONO,0)=0 
                    AND C.ITST=DECODE(C.STYP,0,11,14)
                    GROUP BY NVL(A.STYP,0),A.DAT,C.BATNO,C.ITST,B.DEMNO,B.ITEM,D.ITEMNAME,A.CSNO,PARTY,P.DAT,DEPT.SEC_NAME,P.TRNO,C.EBY, C.SYSIP, C.TDAT,
                    CSRAT,A.PDAYS,C.CSTERM,B.GST,E.MASTDS,D.UOM ORDER BY A.CSNO,D.ITEMNAME
    ORDER BY "DAT" DESC
    which i can not generate by using the Entity objects, Basically I am transforming an oracle form base ERP into Oracle ADF application, so I have available all the quries , Please let me know if i can have any alternative solution ?

Maybe you are looking for

  • How do I re-install Mountain Lion on a new hard drive (replacement)?

    I have an older iMac 24" (2007) that has been up-graded to Mountain lion.  I want to replace my hard drive with a bigger one (has 500Gb).  How can I re-install Mountain Lion on my new drive?  I have Time Machine on this machine.

  • Viewing maps

    Hi guys, new to ovi maps. I have loaded uk map and paid for the licence so I have turn by turn navigation. I am off to India in september to do a charity event called the rickshaw run wich means driving 2500 miles across india in a tuk tuk. Anyway ha

  • Scripting elements do not load in browser

    Half the navigation elements are invisible in both IE8 and Firefox (I can hover over an empty space - text box tells me what is there and I can click and go the page). Error messages come up with something like "element missing line {;) - this page m

  • First virtual console not working

    I currently have semi-set my arch linux system, the only problem i'm having is that none of the virtual consoles are working. When i hit ctrl-alt-f1, all my monitor displays is "video mode not compatible". Last edited by dozerismydogsname (2010-02-15

  • MGR-02150 error after installing 8.0.6

    After installing Oracle 8.0.6 on either a 'fresh' Windows 2000 or Windows NT4 server, I get the error message "MGR-02150: an unrecognized database version was encountered" all the time. All other versions (from 8.0.5 to 9.0.1) work just fine, it's ju