Query implementation

table 1
=========
col1 date, col2 date
i want to find no of w0rking days between 2 dates(col2-col1).
i got this from the google-
with dt
as
select TO_DATE ('20110101', 'YYYYMMDD') sd ,TO_DATE ('20111231', 'YYYYMMDD') ed
from dual
select sd + (level-1)
from dt
where to_char(sd + (level-1),'fmday') not in ('saturday','sunday')
connect by level <= (ed-sd)+1
but i want to implement it here.But i unable to do so.please help me out

Hi,
855516 wrote:
... but i want to implement it here.But i unable to do so.please help me outThe query you posted works for me (in Oracle 10.2.0.1.0). Of course, it shows the dates themselves, not the number of them (which you can get from the SQL*Plus feedback). If you want the query to display the number of work days, then change the main SELECT clause to "SELECT COUNT (*)".
Why can't you implement it? Are you getting an error message? Post the complete error message, includinng line numbers.
Where is "here"? Whenever you have a problem, say which version of Oracle you're using.

Similar Messages

  • Load Date and Count query implementation in ODI

    Hi All,
    I have two different questions.
    1. How to implement load_date to the SCD Type 2 Dimension tables and fact tables? For the SCD Type 2 Tables do I have to say "Add a new record" for Load date? In the Target store it will be Current_Time_Stamp, is thsi correct?
    2. I have the following query I need to add for a column in the target data store.
    select SUM(CASE
    WHEN CAST(a.LAST_IDP_UPDATE AS DATE) BETWEEN dateadd(month,-6, CURRENT_TIMESTAMP) and DATEADD(day,-1,current_timestamp) THEN 1
    ELSE 0
    END ) AS six_months_update from transactions;
    this will be assigned to six_months_update column in the target. Transactions is the main table in this mapping.
    When I use this in the mapping and verify it, it says error. I am not using the keyword "Select" or "AS six_months_update from transactions" in other words the mapping column looks like this
    "SUM(CASE WHEN CAST(a.LAST_IDP_UPDATE AS DATE) BETWEEN dateadd(month,-6, CURRENT_TIMESTAMP) and DATEADD(day,-1,current_timestamp) THEN 1 ELSE 0 END )".
    How do I implement this? Thanks for your time and help.

    Hi,
    ssk1974 wrote:
    1. How to implement load_date to the SCD Type 2 Dimension tables and fact tables? For the SCD Type 2 Tables do I have to say "Add a new record" for Load date? In the Target store it will be Current_Time_Stamp, is thsi correct?In the target datastore you will set the SCD Behavior Type to current timestamp.
    > >
    2. I have the following query I need to add for a column in the target data store.
    select SUM(CASE
    WHEN CAST(a.LAST_IDP_UPDATE AS DATE) BETWEEN dateadd(month,-6, CURRENT_TIMESTAMP) and DATEADD(day,-1,current_timestamp) THEN 1
    ELSE 0
    END ) AS six_months_update from transactions;
    this will be assigned to six_months_update column in the target. Transactions is the main table in this mapping.
    When I use this in the mapping and verify it, it says error. I am not using the keyword "Select" or "AS six_months_update from transactions" in other words the mapping column looks like this
    "SUM(CASE WHEN CAST(a.LAST_IDP_UPDATE AS DATE) BETWEEN dateadd(month,-6, CURRENT_TIMESTAMP) and DATEADD(day,-1,current_timestamp) THEN 1 ELSE 0 END )".
    Does the alias "a" on your column match the source table (transactions) alias in the Interface? What error are you getting when it doesn't work?
    Regards,
    Michael Rainey

  • Navigational Attribute Problem in Input Query

    Hi,
    I am having a problem in input query implementation which uses a navigational attribute. I have, for eg, only one char 'customer' in rows; i want to exclude the customers with the status D (deleted) from displaying (Status is nav. attr. of customer).  I tried this by restricting in filter, Status D-"exclude". But as soon as I do this, query no longer remains input ready! (I also tried putting the same restriction in Default Values area rather than Filter, but ended with the same result )
    I discovered that if, furthermore, I put Status in rows (with the above said restriction still remaining), query is again input ready.
    Can't we exclude values in the filter on an input query? I want to know if this is a restriction with IP or a bug?

    Hi Gregor,
    Thanks for the explanation. But this makes me wonder, because due to this restriction one of the BIG advantages queries had over the planning layouts of BPS, seems to be gone. I mean, using navigational attributes for filtering; if we have to always have a single value restriction on a nav. attr., this will really be restricting. Is it expected that this will be changed in a later SP?
    And there is another problem that is coming due to this. When I use the exclude filter and also the nav. attr. Status in rows, then the query becomes input ready, but there are warning messges displaying when the query opens saying -
    Characteristic Customer has no master data for "C1"
    Characteristic Customer has no master data for "C2"
    etc... (these are the customers with status D). We are on SP15.
    Please suggest what should I do to get rid of these messages?
    Edited by: Mayank Gupta on Apr 10, 2008

  • Lingering query cannot process

    Hi, I need some help tracking the reason behind the lingering of a Create Table as Select STATEMENT;
    Something is hapening, most probably some locks have been aquired and never released by the server.
    First of, i am runing queries against a database server with one client: myself. All the queries it runs are ordered by me.
    I cannot make any sense of what is making my query sometimes run, and others not.
    The query I am trying to run:
    CREATE TABLE FAVFRIEND
    NOLOGGING TABLESPACE TARGET
    AS
    SELECT USRID, FAVF
    FROM (
         SELECT ID AS USRID, FAVF
         FROM PROFILE P
         MODEL
              PARTITION BY (ID)
              DIMENSION BY (1 as FINDEX)
              MEASURES (FAVF1, FAVF2, FAVF3, FAVF4, FAVF5, 0 AS FAVF)
              RULES (
                   FAVF[1] = FAVF1[1],
                   FAVF[2] = FAVF2[1],
                   FAVF[3] = FAVF3[1],
                   FAVF[4] = FAVF4[1],
                   FAVF[5] = FAVF5[1]
         ) FAVFRIEND
    WHERE FAVF IS NOT NULL
    The query Is syntatically correct, and has finished more than once.
    Before this query is run my program launches sqlplus with a script that performs
    DROP TABLE FAVFRIEND PURGE;
    QUIT;
    After this I snapshot a set of statistics. That do not involve querying neither the PROFILE table, nor the FAVFRIEND table.
    Finally I order the execution of this query, and most times, it just hangs there not doing any processing.
    I can tell with certanty that all the other sql I have sent to the database has finished execution.
    1) because it was processed via sqlplus, which always disconnects after processing a batch.
    2) because I run the following query:
    select s.username,s.sid,s.serial#,s.last_call_et/60 mins_running,q.sql_text
    from v$session s join v$sqltext_with_newlines q on s.sql_address = q.address
    where status='ACTIVE'
    and s.username = 'SONO99'
    and type <>'BACKGROUND'
    and last_call_et> 0
    order by sid,serial#,q.piece
    Which tells me that the only query sono99 (my user) is running, is the CREATE TABLE as SELECT.
    Furthermore, the exact same procedure that isn't working for this query has worked before with the Unpivot query and the Select Project and Union queries.
    The only thing that changed from the previous benchmakrs to this one is that this one involves the model query.
    Another piece of information, let's say my sqlplus is haning there... trying to execute the Model query that just does not run. I kill sqlplus. Instantly when i query Oracle for the lingering queries with the select from v%session and sql_text, I notice that my CREATE TABLE with model is no longer there. So: disconnecting from the database is enough for oracle to know that the client is no longer interested in a server response.
    After making sure nothing from sono99 is runing against the database, i try to DROP FAVFRIEND TABLE PURGE;
    The statement fails because no FAVFRIEND table was created. And finally i wonder: could it be that the PROFILE table that was only selected upon was locked?
    Well, i try to drop the profile table... and it drops.
    So: my conclusion is! No locks exist neither on the Profile table nor on the Database object Favfriend (which does not exist at the point that i issue the execution of this query). Possibly some temporary tablespace was aquired by the Model query that has not been made available by oracle at the End of a previous successful CRETE TABLE as select statement.
    But even if this was the case, any locks should have been released because I always restart the database before going into the
    snapshot
    create table as select
    snapshot.
    I have no idea what may be making oracle not process my statement.
    Something else that I have just tried:
    Now I just tried bulk loading the 5 million rows of data into the Profile table, and runing the query again.
    The data was of course inserted successfully, and the query is of course still hanging.
    I tried however, in parallel to run a second query, this one just performing a SELECT count(*) FROM PROFILE, and it succeeded doing so.
    A Select NAME FROM PROFILE WHERE ID=500000 also returns a result.
    The profile table is definably not the issue here.
    by the way i just exported to a txt the status of my haning oracle system, and it looks like this:
    "USERNAME"     "SID"     "SERIAL#"     "MINS_RUNNING"     "SQL_TEXT"
    "SONO99"     "140"     "40"     "10,9"     "CREATE TABLE FAVFRIEND
    NOLOGGING TABLESPACE TARGET
    AS
    SELECT USR"
    "SONO99"     "140"     "40"     "10,9"     "ID, FAVF
    FROM (
         SELECT ID AS USRID, FAVF
         FROM PROFILE P
         MODEL"
    "SONO99"     "140"     "40"     "10,9"     "
              PARTITION BY (ID)
              DIMENSION BY (1 as FINDEX)
              MEASURES (FA"
    "SONO99"     "140"     "40"     "10,9"     "VF1, FAVF2, FAVF3, FAVF4, FAVF5, 0 AS FAVF)
              RULES (
                   FAVF[1]"
    "SONO99"     "140"     "40"     "10,9"     " = FAVF1[1],
                   FAVF[2] = FAVF2[1],
                   FAVF[3] = FAVF3[1],
                   FA"
    "SONO99"     "140"     "40"     "10,9"     "VF[4] = FAVF4[1],
                   FAVF[5] = FAVF5[1]
         ) FAVFRIEND
    WHERE F"
    "SONO99"     "140"     "40"     "10,9"     "AVF IS NOT NULL
    This is way beyond my comprehention of Oracle. Going to try to run this again with 100 k tuples instead.
    Edited by: user10282047 on Oct 20, 2009 12:05 PM
    Now, trying the same process, without even restarting the database once (i just killed the lingering sqlplus connection) and recreated the profile table with 100k tuples. It executed successfuly my query. I am starting to think that this problem has something to with oracle and the number of threads it tries to created to run a modal query with 5 Million partitions. But if it is so, it shouldn't work sometimes and others not.
    Edited by: user10282047 on Oct 20, 2009 12:23 PM

    This definably looks like an oracle bug!
    Throughout the night the computer ran several tests against the database with source tables containing less than 5 million tupels and it succeeded in processing them.
    The 5 million tuple query has like 1 in 100 chances of succeeding.
    I thought about chaning the query implementation and eleminating the Partion By (ID),
    but unfortantly the CV(ID) function can only be used on the right side of a rule.
    I cannot right a rule like FAVF(cv(ID), 1) = FAVF1(CV(ID),1),
    and so. While the first CV works the last doesn't.
    Just finished trying this query with 3 million tuples, and It also worked.
    I am gonna quit trying to find out a problem on my behalf, this clearly on Oracle's hands not mine.
    There is some breaking point where the model query stops working.
    Currently i think that it may be related with the Partition By clause, Oracle may not be prepared to handle that many partitions. Unfortunately I can not process the query with just one partiton (that being the whole database table, because they don't allow me to use the CV function on the left side of a rule).
    So I will consider the operator tested.
    Edited by: sono99 on Oct 21, 2009 8:27 AM

  • Which one should we go for Named Query or Redirect Query???

    Hi all,
    We are in the process of implementing top-links in our project so we are working with different queries of top-links. We have made most of them many of the queries are clear in their concept and implementation. It was a very nice experience working for now. but i have some un-answered questions like
    ---- what is the difference between Redirect query and Named query (Both seems to be the same... to me). we got output using Redirect query but i am totally confused because in documentation it gave that redirect query is used in situation where query is complex and named query cannot be used for it.But i personally feel some things about redirect query .....
    -- Query implementation is itself complex and confusing .
    -- What operations can we do in the static method where we are redirecting the query.
    -- Almost of all the methods in the 'ClassDescriptor ' are deprecated...
    -- Not Much Implementation code is available in Top-link docs nor On-line.
    That's why i am not able to decide which query i must use for a complex query i would prefer named query from myself because of its simplicity and straight forwardness.
    Can any one clear my questions.....
    Many questions in days to come........
    Thanks in Advance
    Adil

    no reply ..... :-)

  • Can JDO Query be extended

    Hi,
    Does KODO provide a hook to extend the javax.jdo.Query's implementation
    class from KODO, they way it supports extending PersistenceManagerImpl?
    Most of my objects need to be transferred over wire, and they should have
    their identity accessible from the object itself when it goes in a
    different jvm. If I can extend the Query's execute() methods to populate
    their id in the object itself, that would look like a cleaner and
    transparent solution.
    Suggestions?
    Regards,
    Manoj

    Manoj-
    JDO does a lazy fetching of objects A, when B.getA() is called. I need to
    have "id" member variable of A also populated before returning the
    collection.Hmm ... do you mean that you just want to populate an "id"
    field when you load an instance of A? If that is all you are trying to
    do, then I would suggest having your class implement
    javax.jdo.InstanceCallbacks and doing that work in jdoPostLoad().
    In article <[email protected]>, Manoj Prakash wrote:
    class A{
    int id
    // other primitive members
    Class B{
    int id
    HashSet a // collection of A
    public Collection getA(){
    return a;
    When I query objects of class B, I can use the FacadeQuery the way you
    suggested, to populate "id" member variable of B.
    JDO does a lazy fetching of objects A, when B.getA() is called. I need to
    have "id" member variable of A also populated before returning the
    collection.
    I wanted to know what method(s) if overridden in PersistenceManagerImpl
    would provide me hook to do that.
    Regards,
    Manoj
    Marc Prud'hommeaux wrote:
    Manoj-
    I'm not sure what you mean. Can you post some pesudo-code of what you
    are trying to accomplish?
    In article <[email protected]>, Manoj Prakash wrote:
    Great, thanks.
    What methods if overridden from PersistenceManagerImpl can take care of
    the case of populating Ids for the objects in a Collection, during lazy
    fetching?
    Marc Prud'hommeaux wrote:
    Manoj-
    You can't directly extend our Query implementation, but you could always
    extend PersistenceManagerImpl and extend all the methods that return
    queries to wrap them in a ManojQueryFacade class that just does what you
    want in the execute method before delegating the call to the internally
    held query. I think that should work OK (although I haven't actually
    tried it).
    In article <[email protected]>, Manoj Prakash wrote:
    Hi,
    Does KODO provide a hook to extend the javax.jdo.Query's implementation
    class from KODO, they way it supports extending PersistenceManagerImpl?
    Most of my objects need to be transferred over wire, and they should
    have
    their identity accessible from the object itself when it goes in a
    different jvm. If I can extend the Query's execute() methods to populate
    their id in the object itself, that would look like a cleaner and
    transparent solution.
    Suggestions?
    Regards,
    Manoj
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Help with FinderDefinitionHelper query

    I am keep getting an error message that says "query undefined"
    I've got all my Named queries working ok, but the query giving me a problem looks like this:
    FinderDefinitionHelper class:
    public static Vector findAllMaxPendingSites(Session s, Vector args) {
    //Home finder API: Enumeration findAllMaxPendingSites(java.lang.Integer topN)
    ReadAllQuery raq;
    ExpressionBuilder builder;
    raq = new ReadAllQuery();
    raq.setReferenceClass(RetailPendingSiteBean.class);
    raq.addDescendingOrdering("pending");
    raq.addArgument("topN");
    raq.setMaxRows(((Integer) args.elementAt(0)).intValue());
    Vector results = (Vector) s.executeQuery(raq);
    // System.out.println("size of vector:"+results.size());
    return results;
    RetailSiteBean Home class:
    public Enumeration findAllMaxPendingSites(java.lang.Integer topN) throws RemoteException, FinderException;
    ======================================================
    Maybe the question I need to ask is, how does one successfully implement such a query. I've tried doing it like the Employee example has shown, but I'm just not getting it right. Can someone please assist maybe with the process of implementing a query such as the one above. I think I'm on the right track, I'm just missing something really crucial to the whole process.
    I have the query implementation as shown above in the FinderDefinitionHelper class and the declaration in the Home interface of the referenced Entity Bean, but I'm having no success. Is there some additional steps I need to do? Maybe in the MW, or anything else?
    Pleaseeee!!! Help!!!!
    Thanx

    still getting a stacktrace..
    javax.ejb.FinderException: EXCEPTION [EJB - 10005]: Cannot find bean using finder: [findAllMaxPendingSites]. [EXCEPTION [TOPLINK-6086] (TopLink (WLS CMP) - 9.0.3 (Build 423)): oracle.toplink.exceptions.QueryException
    EXCEPTION DESCRIPTION: The redirection query's method invocation triggered an exception.
    INTERNAL EXCEPTION: EXCEPTION [TOPLINK-6085] (TopLink (WLS CMP) - 9.0.3 (Build 423)): oracle.toplink.exceptions.QueryException
    EXCEPTION DESCRIPTION: The redirection query's method is not defined or defined with the wrong arguments. It must be declared "public static" and have arguments (DatabaseQuery, DatabaseRow, Session) or (Session, Vector) .
    Class: [class com.bp.ar1.csc.ejb.quintus.FinderDefinitionHelper]
    Method: [findAllMaxPendingSites]
    INTERNAL EXCEPTION: java.lang.NoSuchMethodException
    QUERY: ReadAllQuery(com.bp.ar1.csc.ejb.quintus.RetailPendingSiteBean)
    QUERY: ReadAllQuery(com.bp.ar1.csc.ejb.quintus.RetailPendingSiteBean)]
    server stacktrace is:
    LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-6086] (TopLink (WLS CMP) - 9.0.3 (Build 423)): oracle.toplink.exceptions.QueryException
    EXCEPTION DESCRIPTION: The redirection query's method invocation triggered an exception.
    INTERNAL EXCEPTION: EXCEPTION [TOPLINK-6085] (TopLink (WLS CMP) - 9.0.3 (Build 423)): oracle.toplink.exceptions.QueryException
    EXCEPTION DESCRIPTION: The redirection query's method is not defined or defined with the wrong arguments. It must be declared "public static" and have arguments (DatabaseQuery, DatabaseRow, Session) or (Session, Vector) .
    Class: [class com.bp.ar1.csc.ejb.quintus.FinderDefinitionHelper]
    Method: [findAllMaxPendingSites]
    here is my FinderDefinitionHelper
    =================================
    public static void addRetailPendingSiteFinders(Descriptor descriptor) {
    * Enumeration findAllMaxPendingSites() throws FinderException,
    ReadAllQuery query = new ReadAllQuery();
    query.setName("findAllMaxPendingSites");
    query.setRedirector(new MethodBaseQueryRedirector(com.bp.ar1.csc.ejb.quintus.FinderDefinitionHelper.class,
    "findAllMaxPendingSites"));
    descriptor.getQueryManager().addQuery("findAllMaxPendingSites",query);
    redirect query looks like this
    ===============================================
    public static Vector findAllMaxPendingSites(Session s, Vector args) {
    //Home finder API: Enumeration findAllMaxPendingSites(java.lang.Integer topN)
    ReadAllQuery raq;
    ExpressionBuilder builder;
    raq = new ReadAllQuery();
    raq.setReferenceClass(RetailPendingSiteBean.class);
    raq.addDescendingOrdering("pending");
    raq.setMaxRows(5);
    Vector results = (Vector) s.executeQuery(raq, args);
    // System.out.println("size of vector:"+results.size());
    return results;
    My home interface looks like this
    ======================================================
    public interface RetailPendingSiteHome extends EJBHome {
         public RetailPendingSite create(BigDecimal siteId, BigDecimal pending, String fullName) throws RemoteException, CreateException;
         public RetailPendingSite create(BigDecimal siteId) throws RemoteException, CreateException;
         public RetailPendingSite findByPrimaryKey(BigDecimal primaryKey) throws RemoteException, FinderException;
         //public Enumeration findAllMaxPendingSites(java.lang.Integer topN) throws RemoteException, FinderException;
    public Enumeration findAllMaxPendingSites() throws RemoteException, FinderException;
         public Enumeration findPendingSites(java.lang.String sites) throws RemoteException, FinderException;
         public Enumeration findPendingSitesForBanner() throws RemoteException, FinderException;
    my bean looks like this
    =====================================================
    public class RetailPendingSiteBean implements EntityBean {
         EntityContext entityContext;
         public String fullName;
         public BigDecimal pending;
         public BigDecimal siteId;
         // Entity Bean Required Methods
         public BigDecimal ejbCreate(BigDecimal siteId, BigDecimal pending, String fullName) throws CreateException {
              this.siteId = siteId;
              this.pending = pending;
              this.fullName = fullName;
              return null;
         public BigDecimal ejbCreate(BigDecimal siteId) throws CreateException {
              return ejbCreate(siteId, null, null);
         public void ejbPostCreate(BigDecimal siteId, BigDecimal pending, String fullName) throws CreateException {
         public void ejbPostCreate(BigDecimal siteId) throws CreateException {
              ejbPostCreate(siteId, null, null);
         public void ejbRemove() throws RemoveException {}
         public void ejbActivate() {}
         public void ejbPassivate() {}
         public void ejbLoad() {}
         public void ejbStore() {}
         public void setEntityContext(EntityContext entityContext) {     this.entityContext = entityContext;     }
         public void unsetEntityContext() { entityContext = null;     }
         // Getters and Setters
         public String getFullName () {
              return fullName;
         public BigDecimal getPending () {
              return pending;
         public BigDecimal getSiteId () {
              return siteId;
         public void setFullName (String arg1) {
              fullName = arg1;
         public void setPending (BigDecimal arg1) {
              pending = arg1;
         public void setSiteId (BigDecimal arg1) {
              siteId = arg1;
    my remote looks like this
    ===================================================
    public interface RetailPendingSite extends EJBObject {
         String getFullName () throws RemoteException;
         BigDecimal getPending () throws RemoteException;
         BigDecimal getSiteId () throws RemoteException;
         void setFullName (String arg1) throws RemoteException;
         void setPending (BigDecimal arg1) throws RemoteException;
         //void setSiteId (BigDecimal arg1) throws RemoteException;
    ===============================================
    i've made no changes to any xml descriptors i.e ejb-jar.xml, weblogic-jar.xml etc
    I am using EJB CMP 1.1
    I've added the addRetailPendingSiteFinders method in the "after load" in the MW
    =====================================================
    WHAT IS HAPPENING, any ideas?

  • Refresh the object associated with a Row in a Data Control?

    I am using EclipseLink & have an issue with multiple updates of the same Row. During an update, a new instance of the entity is returned by the update method. The instance bound to the Row is not updated with this new version and subsequent updates fail with an optimistic locking exception since the entityVersion hasn't been updated.
    Question: Is it possible to refresh the instance associated with a data control Row? I can remove rows, create rows, but it is not apparent to me how to update a row. I am trying to avoid doing a full retrieve on the bound iterator.

    Hi!
    The issue here is, by my opinion, a gap between ADFm and EJB 3.0 in use-cases with large data sets. If you search this forum, you may find related thread by Pedja about problem of feasible "scrollable" af:table with large number of entities in EJB finder result list. Unfortunately, the ADFm "paged" fetching is in mismatch with EJB support for "paged" (or scrollable) results lists. The all results of EJB finder method are retrieved from data source, stored in memory (thus breaking the heap) and transferred to ADF datacontrol. Then, and only then, ADFm paged fetching and caching mechanisms are employed – but they are just cosmetics as the main data set is permanently stored in memory as List<?>. The workaround is, as Pedja discovered, to write completely proprietary TableCollectionModel which completely evades ADFm and is implemented by set of EJB Session methods for paged acces to datasource through TopLink and native database queries (enabling retrieval of particular range of rows instead a complete result set). Of course, this is very complex coding experience and I find it a not acceptable for efficient development of modern applications on ADF + EJB stack, especially as it brakes a technology independence promoted by EJB and EclipseLink and other standards-based technologies (as you have to use database-specific native query implementation for paged /scrollable access!).
    What I want to say is that I have feeling that ADF support for EJB is not complete in full extend and that ADFm is still much better suited for BCs then for EJBs. I hope that this will be solved in future as this issue may pose a significant issue on application development in enterprise-level area where it is supposed that we are dealing with BROWSING also a large data sets.
    Yes, I emphasize a BROWSING as I strongly oppose a dogmatic approach that SEARCHING is a solution for every use-case. From theory of information, the system SHOULD NOT limit the user in accessing ALL information (based on access rights, of course). So the idea that SEARCH forms should be used to bridge a architectural gap between a ADFm and EJB is not acceptable, as the search MAY limit the user in acquiring the information he (or she) is not able to describe in adequate manner based on search criteria offered by the developer. So, the developer may be responsible for misinformation of user, by limiting his access to information, jus for technology limitations of ADFm which forces a development of purely SEARCH-based functionalities.
    I hope that development team would appreciate and consider this remarks, and invest effort in closing (not bridging!) the gap between ADFm and EJB.
    Regards,
    PaKo

  • NotSerializableException using PreparedStatement in 2.3.1

    Hi,
    I tried the new 2.3.1 and got a java.io.NotSerializableException using
    query.executeWithMap(...) on a precompiled query. The same query without
    precompilation succeeds.
    We use an Oracle 8.1.7.
    This is the query:
    String filter = "fromStateNode == from && action.name == name";
    Class cls = Class.forName("TransitionDef");
    Extent extent = pm.getExtent (cls, true);
    Query query = pm.newQuery (extent, filter);
    query.declareParameters("StateNodeDef from, String name");
    query.compile();
    now let:
    StateNodeDef fromState => be a PersistenceCapable class,
    initialized by a former query
    String actionName => a non-null-String
    and execute the query:
    HashMap params = new HashMap(2);
    params.put("from",fromState);
    params.put("name",actionName);
    Collection result = (Collection)query.executeWithMap(params);
    => The precompiled query throws the java.io.NotSerializableException (the next
    line of the stack trace is the method that executes the query)
    => If I remove the query.compile, the query succeeds.
    The important parts of package.jdo:
    <class name="TransitionDef">
    <extension vendor-name="tt" key="table" value="VC_TRANSITION"/>
    <extension vendor-name="tt" key="pk-column" value="ID"/>
    <extension vendor-name="tt" key="lock-column" value="none"/>
    <extension vendor-name="tt" key="class-column" value="none"/>
    <!-- a StateNodeDef: -->
    <field name="fromStateNode">
    <extension vendor-name="tt" key="data-column" value="FROM_NODE_ID"/>
    </field>
    <!-- a StateNodeDef: -->
    <field name="toNode">
    <extension vendor-name="tt" key="data-column" value="TO_NODE_ID"/>
    </field>
    <!-- an ActionDef: -->
    <field name="action">
    <extension vendor-name="tt" key="data-column" value="ACT_ID"/>
    </field>
    </class>
    <class name="NodeDef">
    <extension vendor-name="tt" key="table" value="VC_TYPED_NODE"/>
    <extension vendor-name="tt" key="pk-column" value="ID"/>
    <extension vendor-name="tt" key="lock-column" value="none"/>
    <extension vendor-name="tt" key="class-column" value="CLASS"/>
    <field name="name">
    <extension vendor-name="tt" key="data-column" value="NAME"/>
    </field>
    </class>
    <class name="StateNodeDef" persistence-capable-superclass="NodeDef">
    ...some more fields...
    </class>
    <class name="ActionDef">
    <extension vendor-name="tt" key="table" value="VC_ACTION"/>
    <extension vendor-name="tt" key="pk-column" value="ID"/>
    <extension vendor-name="tt" key="lock-column" value="none"/>
    <extension vendor-name="tt" key="class-column" value="none"/>
    <field name="type" persistence-modifier="none"/>
    <field name="name">
    <extension vendor-name="tt" key="data-column" value="NAME"/>
    </field>
    ...some more fields...
    </class>
    Another hint for the solution could be this case:
    The same query with the parameters
    StateNodeDef fromState => be a PersistenceCapable class,
    initialized by a former query
    but now:
    String actionName => a NULL-String
    succeeds precompiled and compiled.
    Any ideas?
    Thanks,
    Christian

    Abe White wrote:
    Could you please post the stack trace for the exception?As described before:
    => The precompiled query throws the java.io.NotSerializableException (the next
    line of the stack trace is the method that executes the query)
    The method that executes the query (calls query.executeWithMap) is a
    business method, the stack trace doesn't contain any information that
    spots to kodo-methods, I suppose the query-implementation does not catch
    this exception.
    Maybe kodo tries to serialize any objects of the query?
    Hope this helps.
    Christian

  • One-to-many selfjoin removing records with the same ranking or with a substitute

    Sorry for my bad choice of discussion title, feel free to suggest me a more pertinent one
    I've rewritten post for clarity and following the FAQ.
    DB Version
    I'm using Oracle Enterprise 10g 10.2.0.1.0 64bit
    Tables involved
    CREATE TABLE wrhwr (
    wr_id INTEGER PRIMARY KEY,
    eq_id VARCHAR2(50) NULL,
    date_completed DATE NULL,
    status VARCHAR2(20) NOT NULL,
    pmp_id VARCHAR2(20) NOT NULL,
    description VARCHAR2(20) NULL);
    Sample data
    INSERT into wrhwr  VALUES (1,'MI-EXT-0001',date'2013-07-16','Com','VER-EXC','Revisione')
    INSERT into wrhwr VALUES  (2,'MI-EXT-0001',date'2013-07-01','Com','VER-EXC','Verifica')
    INSERT into wrhwr  VALUES (3,'MI-EXT-0001',date'2013-06-15','Com','VER-EXC','Revisione')
    INSERT into wrhwr  VALUES (4,'MI-EXT-0001',date'2013-06-25','Com','VER-EXC','Verifica')
    INSERT into wrhwr  VALUES (5,'MI-EXT-0001',date'2013-04-14','Com','VER-EXC','Revisione')
    INSERT into wrhwr  VALUES (6,'MI-EXT-0001',date'2013-04-30','Com','VER-EXC','Verifica')
    INSERT into wrhwr  VALUES (7,'MI-EXT-0001',date'2013-03-14','Com','VER-EXC','Collaudo')
    Query used
    SELECT *
      FROM (SELECT eq_id,
                   date_completed,
                   RANK ()
                   OVER (PARTITION BY eq_id
                         ORDER BY date_completed DESC NULLS LAST)
                      rn
              FROM wrhwr
             WHERE     status != 'S'
                   AND pmp_id LIKE 'VER-EX%'
                   AND description LIKE '%Verifica%') table1,
           (SELECT eq_id,
                   date_completed,      
                   RANK ()
                   OVER (PARTITION BY eq_id
                         ORDER BY date_completed DESC NULLS LAST)
                      rn
              FROM wrhwr
             WHERE     status != 'S'
                   AND pmp_id LIKE 'VER-EX%'
                   AND description LIKE '%Revisione%') table2,
           (SELECT eq_id,
                   date_completed,           
                   RANK ()
                   OVER (PARTITION BY eq_id
                         ORDER BY date_completed DESC NULLS LAST)
                      rn
              FROM wrhwr
             WHERE     status != 'S'
                   AND pmp_id LIKE 'VER-EX%'
                   AND description LIKE '%Collaudo%') table3
    WHERE     table1.eq_id = table3.eq_id
           AND table2.eq_id = table3.eq_id
           AND table1.eq_id = table2.eq_id
    Purpose of the above query is to selfjoin wrhwr table 3 times in order to have for every row:
    eq_id;
    completition date of a work request of type Verifica for this eq_id (table1 alias);
    completition date of a wr of type Revisione (table2 alias) for this eq_id;
    completition date of a wr of type Collaudo (table3 alias) for this eq_id;
    A distinct eq_id:
    can have many work requests (wrhwr records) with different completition dates or without completition date (date_completed column NULL);
    in a date range can have all the types of wrhwr ('Verifica', 'Revisione', 'Collaudo') or some of them (ex. Verifica, Revisione but not Collaudo, Collaudo but not Verifica and Revisione, etc.);
    substrings in description shouldn't repeat;
    (eq_id,date_completed) aren't unique but (eq_id,date_completed,description,pmp_id) should be unique;
    Expected output
    Using sample data above I expect this output:
    eq_id,table1.date_completed,table2.date_completed,table3.date_completed
    MI-EXT-001,2013-07-01,2013-07-16,2013-03-14 <--- for this eq_id table3 doesn't have 3 rows but only 1. I want to repeat the most ranked value of table3 for every result row
    MI-EXT-001,2013-07-01,2013-06-15,2013-03-14 <-- I don't wanna this row because table1 and table2 have both 3 rows so the match must be in rank terms (1st,1st) (2nd,2nd) (3rd,3rd)
    MI-EXT-001,2013-06-25,2013-06-15,2013-03-14 <-- 2nd rank of table1 joins 2nd rank of table2
    MI-EXT-001,2013-04-30,2013-04-14,2013-03-14 <-- 1st rank table1, 1st rank table2, 1st rank table3
    In vector style syntax, expected tuple output must be:
    ix = i-th ranking of tableX
    (i1, i2, i3) IF EXISTS an i-th ranking row in every table
    ELSE
    (i1, b, b)
    where b is the first available lower ranking of table2 OR NULL if there isn't any row  of lower ranking.
    Any clues?
    With the query I'm unable to remove "spurius" rows.
    I'm thinking at a solution based on analytic functions like LAG() and LEAD(), using ROLLUP() or CUBE(), using nested query but I would find a solution elegant, easy, fast and easy to maintain.
    Thanks

    FrankKulash ha scritto:
    About duplicate dates: I was most interested in what you wanted when 2 (or more) rows with the same eq_id and row type (e.g. 'Collaudo') had exactly the same completed_date.
    In the new results, did you get the columns mixed up?  It looks like the row with eq_id='MI-EXT-0002' has 'Collaudo' in the desciption, but the date appears in the verifica column of the output, not the collaudo  column.
    Why don't you want 'MI-EXT-0001' in the results?  Is it realted to the non-unique date?
    For all optimization questions, see the forum FAQ:https://forums.oracle.com/message/9362003
    If you can explain what you need to do in the view (and post some sample data and output as examples) then someone might help you find a better way to do it.
    It looks like there's a lot of repetition in the code.  Whatever you're trying to do, I suspect there's a simpler, more efficient way to do it.
    About Duplicate dates: query must show ONLY one date_completed and ignore duplicated. Those records are "bad data". You can't have 2 collaudos with the same date completed.
    Collaudo stands for equipment check. A craftperson does an equipment check once a day and, with a mobile app, update the work request related to equipment and procedure of preventive maintenance, so is impossibile that complete more than one check (Collaudo) in a day, by design.
    In the new results, it's my fault: during digitation I've swapped columns
    With "I don't want 'MI-EXT-0001'" I mean: "I don't want to show AGAIN MI-EXT-0001. In the previous post was correct the output including MI-EXT-0001.
    Regarding optimisation...
    repetition of
    LAST_VALUE ( 
                            MIN (CASE WHEN r_type = THEN column_name END) IGNORE NULLS) 
                         OVER (PARTITION BY eq_id ORDER BY r_num)  AS alias_column_name
    is because I don't know another feasible way to have all columns needed of table wrhwr in main query, maintaining the correct order. So i get them in got_r_type and propagate them in all the subquery.
    In main query I join eq table (which contains all the information about a specific equipment) with "correct" dates and columns of wrhwr table.
    I filter eq table for the specific equipment standard (eq_std column).
    efm_eq_tablet table and where clause
    AND e.eq_id = e2.eq_id 
              AND e2.is_active = 'S'; 
    means: show only rows in eq table that have an equal row in efm_eq_tablet table AND are active (represented by 'S' value in is_active column).
    About the tables v2, r2 and c2
              (SELECT doc_data, doc_data_rinnovo, eq_id 
                 FROM efm_doc_rep edr 
                WHERE edr.csi_id = '1011503' AND edr.doc_validita_temp = 'LIM') v2, 
              (SELECT doc_data, doc_data_rinnovo, eq_id 
                 FROM efm_doc_rep edr 
                WHERE     eq_id = edr.eq_id 
                      AND edr.csi_id = '1011504' 
                      AND edr.doc_validita_temp = 'LIM') r2, 
              (SELECT doc_data, doc_data_rinnovo, eq_id 
                 FROM efm_doc_rep edr 
                WHERE     edr.csi_id IN ('1011505', '1011507') 
                      AND edr.doc_validita_temp = 'LIM' 
                      AND adempimento_ok = 'SI') c2, 
    Those tables contains "alternate" dates of completition to be used when there isn't any wrhwr row for an eq_id OR when all date_completed are NULL.
    NVL() and NVL2() functions are used in main query in order to impletement this.
    The CASE/WHEN blocks inside main query implements the behavior of selecting the correct date based of the above conditions.

  • Equality between primitive and persistent objects

    Folks,
    I have discovered by chance that the KODO Query implementation allows me
    to test for equality between an Integer and a persistent object. This is
    actually phenomenally useful because it allows me to easily work around
    some really inefficient auto-generated SQL (see below).
    I couldn't find anything about this feature in the JDO specs. Is it
    accidental? Is it supported, or likely to disappear in future versions?
    Dave Syer.
    # 'bean' is an object already loaded from the persistence store
    javax.jdo.JDOHelper.getObjectId(bean)Bean-101
    # it has one mutable property, which is persistence capable
    # and also a read-only property which is the database id
    # (Integer) of the property:
    javax.jdo.JDOHelper.getObjectId(bean.getProperty())Property-371
    bean.getPropertyId()371
    # get an extent for querying (pm is the PersistenceManager)
    ex=pm.getExtent(Bean,0)# First do a query on property...
    qu=pm.newQuery(ex);
    qu.declareParameters("Property id1");
    qu.setFilter("property == id1")# ...generates SQL with additional unnecessary(?) Cartesian join
    # to PROPERTY table:
    res=qu.execute(bean.getProperty())# resulting SQL:
    # SELECT t0.PROPERTY_ID, t0.PROPERTY_ID FROM BEAN t0, PROPERTY t1
    # WHERE (t0.PROPERTY_ID = 371 AND t0.PROPERTY_ID =
    # t1.PROPERTY_ID)
    # Now do a query on propertyId (Integer)...
    qu=pm.newQuery(ex);
    qu.declareParameters("java.lang.Integer id1");
    qu.setFilter("propertyId == id1")# ...but parameter value is allowed to be a Property -- magically
    # turned into an integer when the SQL is generated:
    res=qu.execute(bean.getProperty())# resulting SQL:
    # SELECT t0.PROPERTY_ID, t0.PROPERTY_ID FROM BEAN t0 WHERE
    # t0.PROPERTY_ID = 371

    It is accidental and unsupported.Is there any other way to get round the 'unnecessary join' issue that I
    mentioned briefly in my original posting? In a real world example, I was
    able to improve performance of a single query by a factor of 100 (and my
    DB experts tell me there was no way to optimise indexes or anything at the
    RDBMS level and achieve the same result).
    DAve.

  • [Beginner] Best practice Backing Bean, DataBinding

    Hi everybody,
    I followed an oracle course in November 'Oracle Fusion Middleware 11g: Build Applications with ADF I'
    Great, now I know what are the different parts of the framework.
    But now I'd like to go a bit in depth.
    Here is a simple example
    Login page
    Backing Bean
    Session Bean
    Read only View Object (select from view)
    Application module
    We have a username and password in a table but the password is encrypted in the column, in fact this is the checksum of the password.
    Here is what should be done.
    Login page (username, password) --> proceed button --> get data from VO --> compare usernames --> transform password coming from the login page (MD5) --> compare it to the database password -->
    setting params to session bean --> redirecting to login2 page.
    Here is what I have actually
    I have a tuned AM with a java class having a method doLogin(String username, String password) with a String return value.
    This method is exposed to the UI via a client interface.
    Here are my questions.
    Where do I have to check and transform all those params. In the Read Only VO via a tuned Java class extending ViewRowImpl or in the tuned AM java class ??
    And now for the session bean where do I have to instanciate it. In the Backing Bean I suppose.
    Wouldn't it be better to call the client interface from the backing bean, then instanciate the session bean, with params coming from the AM, in that BackBean.
    I have so many question that I don't know where to begin. :-(
    Kind Regards for your help.
    Stessy Delcroix

    Hi Frank,
    thanks for your response.
    Now where do I have to implement the logic behind the login.
    I explain a bit the application.
    We have coordinator and partner who can connect to the website.
    If a coordinator didn't change the passwords for both coordinator and partner, the partner cannot login.
    And a message will be displayed on the login page.
    If the username or password is not correct, another message will be displayed.
    Now how to return the params of the query ??
    Do I have to implement the logic at the AM level or at the VO level ??
    I mean calling findViewObject in the AM, play with the result of the query, implement the logic and return the params that will have to be set in a session bean
    Here is the query we have
    SELECT A.PASSWORD, A.TYPE, A.PROPOSAL_ID, R.CALL_ID, R.INSTRUMENT_ID, R.ONLINE_PREPARATION, A.STATUS, I.ANNEXES_UPLOAD, C.SINGLE_PARTNER, I.REFEREE_FUNCTIONALITY, A.REFEREE_ID, I.INSTRUMENT_CODE, C.TWO_PARTB_FUNCTIONALITY, C.STAGE_TYPE, EIL.SETUP_TYPE, C.CALL_CODE, I.MANDATORY_ANNEXES " +
                   " FROM EPSS_CREDENTIALS_VIEW A, EPSS_REGISTRATION R, EPSS_INSTRUMENT I, EPSS_CALL C, EPSS_INSTRUMENT_LIST EIL" +
                   " WHERE (USERNAME = ? AND A. PROPOSAL_ID = R. PROPOSAL_ID AND R.INSTRUMENT_ID = I.INSTRUMENT_ID AND C.CALL_ID = R.CALL_ID AND I.INSTRUMENT_CODE = EIL.INSTRUMENT)
    All the values except Password will be set in a session bean.
    I know that question is a bit annoying, but I don't want to start implementing things in the wrong way. And having dependencies between layers.
    That's strange that no best practices examples have been published yet.
    Thanks a lot for your precious help.
    Regards,
    Stessy
    Edited by: Stessy.Delcroix on Mar 10, 2011 3:51 PM

  • Javacsript error

    Javascript Error:
    I am unable to validate using my javascript functions in my jsp when there is indexed=true is there in my <html:checkbox
    import java.io.Serializable;
    public class Query implements Serializable {
    private String queryName;
    private String queryId;
    private String queryString;
    private boolean isDefault;
    private boolean isMyQuery;
    private boolean isActive;
    public void setQueryName(String queryName) {
    this.queryName = queryName;
    public String getQueryName() {
    return queryName;
    public void setQueryId(String queryId) {
    this.queryId = queryId;
    public String getQueryId() {
    return queryId;
    public void setQueryString(String queryString) {
    this.queryString = queryString;
    public String getQueryString() {
    return queryString;
    public void setIsDefault(boolean isDefault) {
    this.isDefault = isDefault;
    public boolean isIsDefault() {
    return isDefault;
    public void setIsMyQuery(boolean isMyQuery) {
    this.isMyQuery = isMyQuery;
    public boolean isIsMyQuery() {
    return isMyQuery;
    public void setIsActive(boolean isActive) {
    this.isActive = isActive;
    public boolean isIsActive() {
    return isActive;
    Action Class
    public class ManageQueriesAction extends Action {
    private static final String ACTION_TOKEN = "ACTION_TO_BE_TAKEN";
    private static final String UPDATE = "UPDATE";
    public ActionForward execute(ActionMapping mapping, ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response) throws IOException,
    ServletException {
    ManageQueriesDelegate manageQueriesDelegate = new ManageQueriesDelegate();
    String action = request.getParameter(ACTION_TOKEN);
    String msg = "predefinedqueries";
    if (action!= null && action.startsWith(UPDATE)) {
    ArrayList updatedQueriesList=((ManageQueriesForm)form).getCustomQueries();
    ((ManageQueriesForm)form).setCustomQueries(manageQueriesDelegate.updatePredefinedQueries(null,updatedQueriesList));
    else {
    ((ManageQueriesForm)form).setCustomQueries(manageQueriesDelegate.getPredefinedQueries(null));
    return mapping.findForward(msg);
    Delegate Class:
    public class ManageQueriesDelegate {
    public ArrayList getPredefinedQueries(Contact contact) {
    //EJB returns arraylist of query objects
    ArrayList queryList=new ArrayList();
    Query query=new Query();
    query.setQueryName("Query 1");
    query.setIsDefault(false);
    query.setIsMyQuery(true);
    query.setIsActive(false);
    queryList.add(query);
    query=new Query();
    query.setQueryName("Query 2");
    query.setIsDefault(true);
    query.setIsMyQuery(true);
    query.setIsActive(false);
    queryList.add(query);
    query=new Query();
    query.setQueryName("Query 3");
    query.setIsDefault(false);
    query.setIsMyQuery(true);
    query.setIsActive(false);
    queryList.add(query);
    query=new Query();
    query.setQueryName("Query 4");
    query.setIsDefault(false);
    query.setIsMyQuery(false);
    query.setIsActive(true);
    queryList.add(query);
    query=new Query();
    query.setQueryName("Query 5");
    query.setIsDefault(false);
    query.setIsMyQuery(false);
    query.setIsActive(true);
    queryList.add(query);
    query=new Query();
    query.setQueryName("Query 6");
    query.setIsDefault(false);
    query.setIsMyQuery(true);
    query.setIsActive(false);
    queryList.add(query);
    query=new Query();
    query.setQueryName("Query 7");
    query.setIsDefault(false);
    query.setIsMyQuery(false);
    query.setIsActive(false);
    queryList.add(query);
    query=new Query();
    query.setQueryName("Query 8");
    query.setIsDefault(false);
    query.setIsMyQuery(false);
    query.setIsActive(false);
    queryList.add(query);
    query=new Query();
    query.setQueryName("Query 9");
    query.setIsDefault(false);
    query.setIsMyQuery(false);
    query.setIsActive(false);
    queryList.add(query);
    query=new Query();
    query.setQueryName("Query 10");
    query.setIsDefault(false);
    query.setIsMyQuery(false);
    query.setIsActive(false);
    queryList.add(query);
    return queryList;
    public ArrayList updatePredefinedQueries(Contact contact,ArrayList preDefinedQueries) {
    return preDefinedQueries;
    Form bean;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    public class ManageQueriesForm extends ActionForm {
    private ArrayList customQueries;
    public void setCustomQueries(ArrayList customQueries) {
    this.customQueries = customQueries;
    public ArrayList getCustomQueries() {
    return customQueries;
    public Query getQuery(int index) {
    if (this.customQueries == null) {
    this.customQueries = new ArrayList();
    // return the requested item
    return (Query)this.customQueries.get(index);
    public void reset(ActionMapping actionMapping,
    HttpServletRequest httpServletRequest) {
    if (this.customQueries != null) {
    for (int i = 0; i < this.customQueries.size(); i++) {
    ((Query)this.customQueries.get(i)).setIsActive(false);
    ((Query)this.customQueries.get(i)).setIsDefault(false);
    ((Query)this.customQueries.get(i)).setIsMyQuery(false);
    jsp:
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%<
    <%@ taglib uri="http://xmlns.oracle.com/portal/pdk/struts/tags-html" prefix="pdk-html"%<
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%<
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%<
    <%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested"%<
    <%@ page import="oracle.portal.provider.v2.render.PortletRenderRequest,oracle.portal.provider.v2.http.HttpCommonConstants,oracle.portal.provider.v2.render.http.HttpPortletRendererUtil,oracle.portal.provider.v2.url.UrlUtils,oracle.portal.utils.NameValue"%<
    <head<
    <script type="text/javascript"<
    function validateDefault(value) {
    var queriesList = new Array();
    queriesList = document.manageQueriesForm.query[0];
    alert(queriesList.length)
    var defaultsList = document.manageQueriesForm.isDefault;
    var myQueriesList = document.manageQueriesForm.isMyQuery;
    var toBeRemovedList = document.manageQueriesForm.isActive;
    if(toBeRemovedList[value].checked ==true ){
         toBeRemovedList[value].checked = false;
    for (i = 0; i < defaultsList.length; i++) {
    if(i != value){
         defaultsList.checked = false;
    function validateMyQuery(value) {
    var defaultsList = document.manageQueriesForm.isDefault;
    var myQueriesList = document.manageQueriesForm.isMyQuery;
    var toBeRemovedList = document.manageQueriesForm.isActive;
    if(toBeRemovedList[value].checked ==true ){
         toBeRemovedList[value].checked = false;
    for (count=0,j = 0;j < myQueriesList.length; j++) {
    if(myQueriesList[j].checked == true){
    count++;
    if(count<5){
    myQueriesList[value].checked =false;
    alert(" Access to atmost 5 'MyQueries'");
    function validateRemove(value) {
    var defaultsList = document.manageQueriesForm.isDefault;
    var myQueriesList = document.manageQueriesForm.isMyQuery;
    var toBeRemovedList = document.manageQueriesForm.isActive;
    if(defaultsList[value].checked == true ){
    toBeRemovedList[value].checked =false;
         alert("Access denied for removing your 'Default Query'");
    else if(myQueriesList[value].checked == true ){
    toBeRemovedList[value].checked =false;
         alert("Access denied for removing your 'MyQuery'");
    </script<
    <title<CB Portal - Manage Queries</title<
    <meta http-equiv="content-language" content="en" /<
    <meta content="W" name="region" /<
    <meta content="EN" name="language" /<
    <meta content="PS" name="document-type" /<
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" /<
    <link rel="stylesheet" type="text/css"
         href="http://www.tek.com/_css/style.css" media="screen, projection"
         title="Tektronix Default Style" /<
    <link rel="stylesheet" type="text/css"
         href="http://www.tek.com/_css/mobile.css" media="handheld"
         title="Tektronix Handheld Style" /<
    <link rel="stylesheet" type="text/css"
         href="http://www.tek.com/_css/print.css" media="print" /<
    <script language="JavaScript" type="text/javascript"
         src="http://www.tek.com/_js/global.js"<</script<
    <script language="javascript" type="text/javascript"
         src="http://www.google-analytics.com/urchin.js"<</script<
    <script type="text/javascript"<
    _uacct = "UA-603472-1";
    uccn="WT.mcid";
    _ucmd="";
    _ucsr="";
    _uctr="";
    _ucct="";
    _ucid="";
    urchinTracker();
    </script<
    <link rel="stylesheet" type="text/css"
         href="http://www.tek.com/_css/lightbox.css" media="screen" /<
    <script type="text/javascript"
         src="http://www.tek.com/_js/lightbox/prototype.js"<</script<
    <script type="text/javascript"
         src="http://www.tek.com/_js/lightbox/scriptaculous.js?load=effects"<</script<
    <script type="text/javascript"
         src="http://www.tek.com/_js/lightbox/lightbox.js"<</script<
    <meta name="wt" content="550" /<
    <script language="javascript" type="text/javascript"
         src="http://www.tek.com/_js/wt.js"<</script<
    <script type="text/javascript" src="http://www.barelyfitz.com/projects/tabber/tabber.js"<</script<
    <link rel="stylesheet" href="http://www.barelyfitz.com/projects/tabber/example.css" TYPE="text/css"
         MEDIA="screen"<
    <link rel="stylesheet" href="http://www.barelyfitz.com/projects/tabber/example-print.css" TYPE="text/css"
         MEDIA="print"<
    </head<
    <body<
    <pdk-html:form action="/ManageQueriesAction.do"<
    <pdk-html:hidden property="ACTION_TO_BE_TAKEN" value="UPDATE"/<
    <div id="maincontent"<
    <style type="text/css"<.keyWordsDiv{visibility:hidden;height:0px;}</style<
    <h1 class="gfx-hd"<</style<Manage Queries</span<</h1<
    <div class="content-wide"<
    <TABLE width=580<
    <thead<
    <TR<
         <TD <<B<Query Name</B<</TD<
         <TD align=center<<B<Default</B<</TD<
         <TD align=center<<B<My Queries</B<</TD<
         <TD align=center<<B<Remove</B<</TD<
    </TR<
    </thead<
    <tbody<
    <logic:iterate name="manageQueriesForm" indexId="i" id="query" property="customQueries" type="com.tek.business.cbportal.model.Query"<
    <%
    String callerDefault="validateDefault('"+i+"')";
    String callerMyQuery="validateMyQuery('"+i+"')";
    String callerRemove="validateRemove('"+i+"')";
    %<
    <tr<
    <td<<bean:write name="query" property="queryName"/<</td<
    <td align=center<<html:checkbox name="query" property="isDefault" indexed="true" onclick='<%=callerDefault%<'/<</td<
    <td align=center<<html:checkbox name="query" property="isMyQuery" indexed="true" onclick='<%=callerMyQuery%<'/<</td<
    <td align=center<<html:checkbox name="query" property="isActive" indexed="true" onclick='<%=callerRemove%<'/<</td<
    </tr<
    </logic:iterate<
    <TR<
         <TD colspan=4 align="center"<
    <html:submit value="Update"/<
    <html:reset value="Cancel"/<
         </TD<
    </TR<
    </tbody<
    </TABLE<
    </div<
    </div<
    </pdk-html:form<
    </body>

    "...errors during the project validation that have to be fixed before burning the project."
    I have the same issue years after your question was posted. My issue is that there were images intentionally left out of the DVD format and submenu's or buttons not on every page of the DVD. Again intentionally. This was a conflict for iDVD, so I added the extra images. Unfortunately you are only allowed 99 submenus so I could not add more to the iDVD project as instructed in the errors listing.
    How can this be burned when I'm not wanting or needing the 'fixes" that iDVD say are missing?

  • Management of Objects that  are created via annotations

    Hello,
    I discribe SequenceGenerator via annotation. Could I somehow take control under it in SessionBean-get next value, etc? The same with NamedQuery - could I modify query before executing, for instance?

    I discribe SequenceGenerator via annotation. Could I
    somehow take control under it in SessionBean-get next
    value, etc?As James pointed out, the JPA spec doesn't provide a way to do this but the underlying TopLink Session has a getNextSequenceNumberValue(java.lang.Class domainClass) method you can use to obtain values from the a sequence. In TopLink Essentials you'll have to downcast your EntityManager to oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl and call getServerSession() to obtain the underlying ServerSession.
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("comics");
    EntityManager em = emf.createEntityManager();
    EntityManagerImpl topLinkEm = (EntityManagerImpl)em;
    // get next sequence number for class Title
    Number nextSeqNum = topLinkEm.getServerSession().getNextSequenceNumberValue(Title.class);
    The same with NamedQuery - could I modify
    query before executing, for instance?You can do the same type of thing by downcasting and working with the underlying TopLink Essentials query implementation classes.
    // get named query and downcast
    EJBQueryImpl query = (EJBQueryImpl)em.createNamedQuery("findWithName");
    DatabaseQuery databaseQuery = query.getDatabaseQuery();
    String queryString = databaseQuery.getEJBQLString();
    // augment query
    queryString = queryString + " and t.format = t.format";
    databaseQuery.setEJBQLString(queryString);
    // set parameters and execute
    query.setParameter("name", "Superman");
    List results =      query.getResultList();--Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Suns LDAP Pool and Multithreading

    I used Suns built in LDAP Pool for quite a while in a multithreaded environment. JDK 1.4.2_08, OpenLdap 2.1.19, Win32.
    Suddenly I have some trouble with it. All pools connections become busy and if that state is reached none is getting free anymore, which locks up my program. I've set the pools logging level to "all" with which I was able to observe how more and more connections get busy until the max connections limit is reached.
    I had had some trouble with the pool. The solution had been to close() each and every JNDI Resource I had requested (NamingEnumerations and Contexts). But now im clueless...
    Anyone who can help with some hints? Are there any rules to observe when using the pool in a multithreaded environment?
    Thanx,
    Peter

    Some more info:
    1. The problem can be reproduced on Java 1.5 and 1.6 (I tried 1.5.0_12 and 1.6.0_01).
    2. Method query() implemented using Netscape LDAP driver works correctly (number of established TCP connections does not exceed 30).
    3. I use Sun LDAP Directory Server 5.2.
    Marek

Maybe you are looking for

  • Submitting PDF files by e-mail

    I am using Adobe Designer 7.0 with Windows XP and am having trouble with a "Button" function. It is set to "Submit" in the Control Type, Submit Format is PDF, and I have the Submit to URL as "mailto:[email protected]". When I try to use this function

  • Change in unit of measure

    Dear Experts, We have one component Comp1 which was used in many products Prod1 , Prod2 , Prod3 ..... The unit of issue maintained for the component is ' m ' which we want to change it to ' kg ' . System is not allowing us to change this unit of issu

  • How to delete dynamically created nodes?

    Hello Colleagues, In our screen we have a push button which adds one node to the context when used. The node is having a few fields which are shown in the UI. So as you keep on pressing the button, additional rows will be appended on the screen. Now,

  • Extract CRM Set Types to BW

    Hello SAP Experts, We have a problem with customer defined set types in CRM. When we created these set types we forgot to select the checkboxes Relevant for BW and Relevant for Selection in BW in some of them. All of them have been assigned to a CRM

  • How can I control the PP (monitor) volume using my computer volume controls.

    I'm no longer able to control the PP (monitor) volume using my computer volume controls. I've always controlled the monitor volume using my computer volume levels, but starting today, that has changed. The volume is just playing at the level recorded