decide on the instance of class really used at runtime

Hello:
I need to ask something form the Pb and then wrap the result of the query as an object and I have several types of mark, so I tried to extract them by using the extension mechanism.

----------------------------------
abstract class AbstractExecutor {
     public String     sql;
     public abstract String execut();
}
class UserExecutor extends AbstractExecutor {
     @Override
     public String execut() {
          ArrayList<User> resList = new ArrayList<User>();
          sql = "select username from user";
          // user the sql to query from db
          ResultSet rs = null;//
          // iterative the rs, make each record to a User object and put it to the
          // list:someting like that:
          User u = new User("This argument coms from the db");
          resList.add(u);
          // build the result string by the resList, here I just call its toString
          // method for example.
          return resList.toString();
     }
     static class User {
          String     name;
          public User(String name) {this.name = name;}
     }
}
class MessageExecutor extends AbstractExecutor {
     @Override
     public String execut() {
          ArrayList<Message> resList = new ArrayList<Message>();
          sql = "select title from message";
          // use the sql to query from db
          ResultSet rs = null;//
          // iterative the rs, make each record to a Message object and put it to
          // the list:someting like that:
          Message u = new Message("This argument coms from the db");
          resList.add(u);
          // build the result string by the resList, here I just call its toString
          // method for example.
          return resList.toString();
     }

     static class Message {
          String     title;
          public Message(String title) {this.title = title;}
     }

}

public class Client {
     public static void main(String[] args) {
          Map<String, AbstractExecutor> map = new HashMap<String, AbstractExecutor>();
          map.put("1", new UserExecutor());
          map.put("2", new MessageExecutor());

          // get the parameter from request...
          int type = 2;
          map.get(type + "").execut();
     }
}
--------------------------------------

Of course the steps in the logic of two bussiness (the UserExecutor and the MessageExecutor) are then same with the others, the only difference is the 'sql' and the 'class' used for wraped the result (the user and the Message)
so I'm wondering, can I extract the same logic to their superclass (AbstractExecutor)?

I tried generics:
--------------------------------------
abstract class AbstractExecutor<E> {
     public String     queryFields[]={};
     public String execut(){
          ArrayList<E> resList = new ArrayList<E>();
          sql = "select "+queryFields[0]+" from "+queryFields[1];
          // use the sql to query from db
          ResultSet rs = null;//
          // iterative the rs, make each record to a E object and put it to
          // the list,someting like that:
          E e = ? // here how to make a instance of E(a User object or a Message object)?
          resList.add(e);
          // build the result string by the resList, here I just call its toString
          // method for example.
          return resList.toString();
     }
}
If the above work, the UserExecutor can be like this:
class UserExecutor extends AbstractExecutor<User> {
     //just override the fields of its superclass.
     queryFields={"username","user"};
}
class User{
          String     name;
          public Message(String name) {this.name = name;}
}
I wonder if it's possible? If generic manufacturers cannot operate, are there other ways to do this?
What I want to really reduced repetitive codes and makes stretch, since I can add another executor in the future.

Your example is simplistic in that the business logic of 'client' (ArrayList.toString ()) depends on the type of the objects in the list.
With this in mind...

I wonder if it's possible?

Yes, just replace the question mark with a call to abstract method (Note: which highlights the model Template methodGoF):

abstract class AbstractExecutor {
     protected abstract E createInstanceOfContent(ResultSet rs);

    public String execut(){
      ArrayList resList = new ArrayList();
      sql = "select "+queryFields[0]+" from "+queryFields[1];
      // use the sql to query from db
      ResultSet rs = null;//
      // iterative the rs, make each record to a E object and put it to
      // the list,someting like that:
      E e = createInstanceOfContent(rs);
      resList.add(e);
      // build the result string by the resList, here I just call its toString
}

class UserExecutor extends AbstractExecutor {
      protected User createInstanceOfContent(ResultSet rs) {
        User user = new User();
        user.setName(...);
        return user;
    }
}

are there other ways to do this?

Your executor abstract is not really taking advantage of security of generic type, so you could do it with simple inheritance:

abstract class AbstractExecutor{
    protected abstract Object createInstanceOfContent(ResultSet rs);

    public String execute(){
      ArrayList resList = new ArrayList();
      sql = "select "+queryFields[0]+" from "+queryFields[1];
      // use the sql to query from db
      ResultSet rs = null;//
      // iterative the rs, make each record to a E object and put it to
      // the list,someting like that:
      E e = createInstanceOfContent(rs);
      resList.add(e);
      // build the result string by the resList, here I just call its toString
}

class UserExecutor extends AbstractExecutor {
      protected Object createInstanceOfContent(ResultSet rs) {
        User user = new User();
        user.setName(...);
        return user;
    }
}

What I want to really reduced repetitive codes and makes stretch, since I can add another executor in the future.

Good intention. Try to identify the operations that are common to all types of executor (for example, the creation of some entity, storage in a collection, iteration over the collection,...) and ask if they take advantage of a common interface of the manipulated entities (your example does not show that).

For your information, Spring 'JDBC' or 'DAO' API, I don't remember the name, introduced models this kind of logic for awhile now. Even if you do not use Spring as a framework for Dependency Injection, spring-jdbc library is worth the visit.

Tags: Oracle

Similar Questions

  • Name of the instance target class TLF

    I'm trying to target a TLF Textfield in a movieclip of this custom class movieclips, but the class cannot find the name of the instance. When I trace the name of the child, what happens with a random instance name, not the name of the instance, I put on the stage. When I try and target timeline of the movieclip, it works very well.

    Is there a class should I include in my custom class, or is this a bug? I would move the TLF dynamic text fields, but it is a big hurdle.

    Any help would be appreciated, thanks.

    both, you must use the addedtostage event before trying to access children.

  • Name of the instance when adding to the library

    It is a huge problem for me then probably the stupidest question in the world.

    When addressing movieclips nested like this: _root.movieclip.movieclip.variable


    they need to have a set instance name, otherwise they count as undefined. If I can put it in properties with no problem, but when it the removal of the step and then time (manually or by actionscript) the name of the instance are gone, so I can't address clips nested in action script.

    I do not understand how it will work, because each time I have add a clip by code there is no instance name. The only alternative for me up to now has kept the clip on the stage all the time, just outside the limits or invisible so I can still do things like _root.movieclip.movieclip.variable or _root.movieclip.movieclip.gotoAndStop (2).

    Someone enlighten me please because I can not understand it.

    The purpose of instance names must be able to use the same object library many times and targets each separately... an instance of this object here, an instance of this object, etc...  The name of the instance applies only to an object on the stage.  A library object has no instance name until you assign a while she participated in the film.

    When you attach a movieclip using the AS2 code, you must use the attachMovie() method.  In the arguments for this method is when you set the name of the instance...

    this.attachMovie (id, name, depth)

    The 'name' argument is the name of the instance you code will use to target this instance.  Hostel if your case you will use...

    this.attachMovie (id, "movieclip1",...)

    I intentionally only focusing on the instance of the name, the other arguments you know if all goes well do deal with

  • How to specify the instance in SQL * more command line?

    Hello

    I'm learning to Oracle. I currently have 2 instances of database running. I wanted to connect to one of the bodies and used the following command from the command line:
    sqlplus system as sysdba/abc123@ocp11gsid
    
    where 1234 is the password for the system user in the ocp11gsys instance.
    When I run the command above, SQL * more ask me the password. I do not understand why he asks me the password because I provided on the command line.

    What is the correct command line, so he asks me the password? (without defining the variable ORACLE_SID of environment - basically, I want to know how to specify the user, his password and sid, all in the sqlplus command line, without being prompted to enter the password that I mentioned.)

    Thank you for your help,

    John.

    John,

    This is how it works.

    E:\Documents and Settings\aristadba>sqlplus system/oracle as sysdba
    
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 2 22:49:25 2010
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL>
    

    And now it ask the password,

    E:\Documents and Settings\aristadba>sqlplus system as sysdba/oracle
    
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 2 22:50:42 2010
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    Enter password:
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL>
    

    Spot the difference?

    The user name and password must unite. What you are to provide the password with the role where it will not be considered.

    Update
    I missed that part,

    What is the correct command line, so he asks me the password? (without defining the variable ORACLE_SID of environment - basically, I want to know how to specify the user, his password and sid, all in the sqlplus command line, without being prompted to enter the password that I mentioned.)

    The only thing that you can specify is the user name and password. The SID must be defined by you, either explicitly using the export or oraenv command if you are on the local system and do not use the TNS to connect to the instance. If you use the TNS, then an appropriate entry should be there which would connect to the required database.

    HTH
    Aman...

    Published by: Aman... on August 2, 2010 22:54

  • Best way to store instances of class (or at least their private data) in a file for later use?

    I've been messing around with this concept for a few hours and have not yet found anything conclusive. I have a system where I want to store instances of a particular class (private data have a 2D array, a 1 d table, some Boolean values, numbers, and a set of strings.) for later use. The goal is to store a table of these classes for customization purposes. I've experimented with palette OpenG configuration file, especially the "read/write formatted article cluster", but I get some strange errors when I change around the private data and try to save the same instance. I thought using flatten XML vi and the wiring of the array of instances followed by reading in a table, but I anticipate similar problems. What other options are there? TDMS? A SQLite database? Should I do a few other split in the very basic types and combine them with the execution having read in? All suggestions/stories welcome.

    LV classes are compatible with the Flatten to Unflatten from XML and XML functions. Have you ever tried this approach?

    Norbert

  • 1013: the private attribute may be used only on class property definitions.

    In the following code, I get an error. How to solve this problem?

    Line 301013: the private attribute may be used only on class property definitions.

    package

    {

    import flash.display.MovieClip;

    import flash.events.Event;

    Caesar/public class extends MovieClip

    {

    var speed: Number;

    public void Caesar()

    {

    addEventListener ("enterFrame"), move;

    }

    public void move(e:Event)

    {

    This.x = mouseX;

    This.y = mouseY;

    If (caesar.hitTestObject (MainClip.instance.enemyList [i]))

    {

    trace ('Caesar should');

    removeSelf();

    MainClip.instance.finishedMainClip ();

    }

    }

    }

    private function removeSelf (): void

    {

    removeEventListener (Event.ENTER_FRAME, move);

    If (stage.contains (this))

    {

    this.parent.removeChild (this);

    }

    }

    }

    Check your dash... Your removeSelf function is outside the definition of the class... that closing brace entered should be after him.

  • [JS, CS4] TextFrame.extractLabel () does not work with the instances of this class

    I have the script, which works very well in CS3. In CS4 (app.version = 6.0.1.532) However, I get an error using extractLabel, after reading a few other a textframe properties:

    frameObject.extractLabel ('name')
    Error: TextFrame.extractLabel () does not work with the instances of this class

    Until the reading of one of the 'normal' properties, such as (frameObject.) content I can call frameObject.extractLabel ('name') without errors, but after "watching" (assign it to a variable in the code, or by getting the value in the javascript console), the content property (or as it seems any normal property) the extractLabel method generates the above error.

    It seems to work to move all frameObject.extractLabel at the beginning of the function calls, but I don't think that I would need to do this.

    It could very well be the case that the label read by extractLabel has no content and never received. Will there be a change in behaviour of CS3 in this sentence? If so, and if this is the reason for the error, is there then a way to determine if the label has been assigned?

    This error is familiar to someone else?

    Best regards

    Andreas

    It works if you use:

    var pgItm = app.activeDocument.textFrames.itemByID(parseInt(myId));
    

    Otherwise, this might work:

    var pgItm = app.activeDocument.pageItems.itemByID(parseInt(myId)).getElements()[0];
    

    Although, generally, itemByID gives you the question no matter what it is as long as there are, so I'm bit puzzled that neither of them will be necessary.

    Dave

  • means of an instance of the class to ask what is the name of the instance?

    Hey. I have a class that needs to create a movie clip on the stage. Because each instance of the class can have 1 clip of film on the scene at a time, it seems reasonable that I have the instance create a clip with its own name, preceded by the prefix with "mc_" or something of the sort.

    Here is where I don't know what to do... How can I get this information? For example, when you one dealing with an XMLNode, you can simply use...

    The_Answer = xmlNodeInstance.nodeName;

    ... I know the analogy fails, but I hope you know what I'm looking for.

    Thank you!

    MovieClips have a _name property AFTER they are instantiated.

  • question related to the configuration of POF and use-sub-classes

    Hello

    I noticed that by default POF in coherence.jar (coherence-pof - config.xml) requires the use subclasses true indicator (the ultimate-sub-classes use value is true if any POF loaded configuration file specifies that it is true), and making it impossible to obtain if certain error messages a subclass of a registered type is not listed specifically in the POF-configuration and users can silently losing data in this way.

    My question is:

    The indicator of use subclasses in coherence-pof-config. XML set to true only because of Throwable-s, or are there other classes provided by coherence that are serialized by a resolution of the subclass and so dependent on the indicator of use subclasses being true?

    If only the Throwable-s which depend on, instead of set to true, can we set it to false and use the following instead of ConfigurablePofContext as class the class serializer for POF-enabled services:
    import com.tangosol.io.pof.ConfigurablePofContext;
    import com.tangosol.run.xml.XmlElement;
    
    /**
     * This class extends ConfigurablePofContext with the possibility to
     * configurably disable the subclass-allowed setting forced true in the
     * coherence-pof-config.xml, and still be able to use ThrowablePofSerializer for
     * each not specifically configured Throwable subclass.
     *
     * @author Robert Varga
     */
    public class ThrowableAwareConfigurablePofContext extends
          ConfigurablePofContext {
    
       /**
        * By setting this flag to true, it is possible to disable subclass
        * resolution. Interface resolution remains untouched.
        */
       private boolean m_fDisableSubclassAllowed;
    
       /**
        * {@inheritDoc}
        */
       public ThrowableAwareConfigurablePofContext() {
       }
    
       /**
        * {@inheritDoc}
        *
        * @param sLocator
        */
       public ThrowableAwareConfigurablePofContext(String sLocator) {
          super(sLocator);
       }
    
       /**
        * {@inheritDoc}
        *
        * @param xml
        */
       public ThrowableAwareConfigurablePofContext(XmlElement xml) {
          super(xml);
       }
    
       /**
        * Sets the {@link #m_fDisableSubclassAllowed} flag. You can set this as an
        * &lt;init-param&gt; in the Coherence cache configuration file.
        *
        * @param disableSubclassAllowed
        */
       public void setDisableSubclassAllowed(boolean disableSubclassAllowed) {
          this.m_fDisableSubclassAllowed = disableSubclassAllowed;
       }
    
       /**
        * @return false if disableSubclassAllowed is true, or result from the super
        *         implementation otherwise.
        */
       @Override
       protected boolean isSubclassAllowed() {
          return (!m_fDisableSubclassAllowed) && super.isSubclassAllowed();
       }
    
       /**
        * If the super implementation could not resolve the type id for the class,
        * and subclass-allowed is disabled and clz is a {@link java.lang.Throwable}
        * subclass then it falls back to the configuration for
        * {@link java.lang.Throwable}.
        */
       @Override
       protected int getInheritedUserTypeIdentifier(Class clz) {
          int result = super.getInheritedUserTypeIdentifier(clz);
          if (result == -1 && !isSubclassAllowed()
                && Throwable.class.isAssignableFrom(clz)) {
             result = getUserTypeIdentifier(Throwable.class);
          }
          return result;
       }
    }
    Thank you and best regards,

    Robert

    Hello

    Ok. Here goes. Yes, you are right. If you can tolerate interface use being true, the only thing you have to worry is Throwable instance (or subclasses it) in Java and Exception instances (or subclasses it) in .NET.
    Please let me know if you have more questions.

    Best regards
    -Dave

  • Generate class files using the WSDL url and wsimport

    I am trying to create a java application that hits the service exposed by hub.

    To create the application in java, I'm generating class files using the WSDL that is created and exposed by the hub.

    Executed steps:

    1 created an application in OPA.

    2. deployed on the hub (usinf deploy option of snapshot on Policy Modeling)

    3. in the deployment tab, I see the request and get the url of the wsdl by clicking on it.

    I try on this wsdl wsimport command. But it gives me following error messages.

    ---------------------------------------------------------------------------------------------------

    C:\***\AllFiles > wsimport http://localhost:7001/hub/determinations-Server/assess/SOAP/generic/12.2/AttemptOne?WSDL

    the analysis of WSDL...

    [ERROR] invalid WSDL http://localhost:7001/hub/determinations-Server/assess/SOAP/generic/12.2/AttemptOne?WSDL , expected {http://schemas.xmlsoap.org/wsdl/} html (line 2) data definitions

    Cannot read the WSDL document: ( http://localhost:7001/Hub/determinations-Server/assess/SOAP/Generic/12.2/AttemptOne?WSDL , because 1) did not find the document. (/ 2) the document could not be read. (3) the element the document root is not < wsdl:definitions >.

    [ERROR] WSDL:service is not found in the WSDL (s) provided:

    At least a WSDL with definition of at least one service must be provided.

    Unable to parse the WSDL file.

    ---------------------------------------------------------------------------------------------------

    If I store the wsdl file in a file on my local computer, and then run wsimport, it generates the classes very well.

    Can someone provide me with a way that I can generate the classes using the wsdl url and not the local file?

    Also, do I need to create a connection in the Connections tab on the hub?

    Thanks in advance.

    -Alain

    Looks like you could run in the user authentication when wsimport runs against the WSDL. Instead of the WSDL, its reception, the login page.

    The best way to work around this problem is perhaps what you do already - to obtain the wsdl and save them in a file.

    Another solution is to disable the restriction of connection to the Web Service API. You can do this in the menu on the users page (admin role can turn on and off.

    You can switch between a user and a password with the call of the WSDL file, but I don't know if its possible to do with wsimport

    See you soon

    Frank

  • How to cancel my subscription to Adobe? I am charged every month and I do not really use it enough to justify. I followed the instructions of tine for how to cancel at least, but it does not give me the "Cancel" button to click.

    I am charged every month and I do not really use it enough to justify. I followed the instructions of tine for how to cancel at least, but it does not give me the "Cancel" button to click.

    Cancel https://helpx.adobe.com/creative-cloud/help/cancel-membership.html

    -or https://helpx.adobe.com/contact.html?step=ZNA_account-payment-orders_stillNeedHelp

  • Dear Sir/Madam I am writing about the suite Adobe Creative License peripheral non-profit in January of this year, we bought. It's been almost four months and we still have to successfully download the software on the computer, so we can really use it.

    Dear Sir/Madam

    I write about more Adobe non-profit instrument allowed Creative, we bought in January this year. It's been almost four months and we still have to successfully download the software on the computer, so we can really use it. It is completely UN acceptable. Despite many attempts and chat sessions with several of your support staff. We lost hours and hours of our precious time trying to get a working to our computer installation. The computer is a newer version than MacBook Pro bought new in January 2015. It's a sad testament to the stability of your SW if you can't creative SW runs on a Mac. I am confused with what I can do about it. Your Tech support staff clearly didn't have the knowledge to fix and the SW is defective and unusable. Is the problem of the license of the device? We can get this as another form. The last chat with one of our staff asked an email address to at least try to get additional contacts for help, but technology chat session refused to give their address. Four different Tech tried different solutions without success. What to do next? Please consult the transcript of what has past and let us know how to proceed. We are a non-profit organization. Our time and money is valuable to us. We want the use of the software that we paid for. We need a solution to this.

    Walter Wilson\

    Executive Director

    Hopesprings Corporation

    [email protected]

    It's our number of VIP
    Hopesprings Corporation
    07C5DAE501894FE5C0DA
    Date of renewal: February 10, 2016

    Try the chat support - for the still need help, click the link below? the option in the blue box below and choose the option to chat...
    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Get help from cat with orders, refunds and exchanges (non - CC)
    http://helpx.Adobe.com/x-productkb/global/service-b.html ( http://adobe.ly/1d3k3a5 )

  • OK, where the oil paintings went.  It is the main thing that I use on photoshop and now he's gone.  I'm really disappointed

    It is the main thing that I use on photoshop and now he's gone.  I'm really disappointed

    Kathy, if you go back to the previous version of Photoshop CC, who still has the oil paint filter.  If you have not installed, open the application manager, click on the drop down filter and choose previous versions.

  • Problem with the named instance of SQL Server using DG4ODBC

    I am running DG4ODBC on a computer LINUX 64-bit with the Microsoft SQL Server driver is installed. I tested successfully with an instance of SQL Server that is not named (GENERALI_DSN). The named instance gives the following when trying to query:

    ORA-28500: connection between ORACLE and a non-Oracle system has sent this message:

    [unixODBC] [Microsoft] [SQL Server Native Client 11.0] Connection timeout expired {HYT00} [unixODBC] [Microsoft] [SQL Server Native Client 11.0] SQL Server Network Interfaces: Error Search Server/Instance specified [xFFFFFFFF].  {NativeErr 08001, = - 1} [unixODBC] [Microsoft] [SQL Server Native Client 11.0] A network-related or instance-specific error all by establishing a connection to SQL Server. Server is not found or is not accessible. Check if the instance name is correct and if SQL Server is configured to allow remote connections. For more information, see SQL Server Books Online. {NativeErr 08001, = - 1}

    ORA-02063: preceding 2 lines of DEVMISC

    ODBC.ini

    [GENERALI_DSN]
    Driver = SQL Server Native Client 11.0
    Server = CLTDMJCWBYZ.eu.scor.local
    User = everest
    Password = everest
    Database = Everest_Generali

    [DEVMISC_DSN]
    Driver = SQL Server Native Client 11.0
    Server = [USVCLTDEVSQL02\DEVMISC]
    User = link_user
    Password = password1
    Database = s/n

    initDG4ODBC2.ora

    #
    # HS init parameters
    #
    HS_FDS_CONNECT_INFO = DEVMISC_DSN
    HS_FDS_TRACE_LEVEL = DEBUG
    HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbc.so

    #
    # ODBC specific environment variables
    #
    Set ODBCINI=/home/oracle/.odbc.ini

    Listener.ora

    SID_LIST_LISTENER_GW =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = DG4ODBC)
    (ORACLE_HOME=/home/oracle/product/11.2.0)
    (ENV=LD_LIBRARY_PATH=/usr/lib64:/home/oracle/product/11.2.0/lib:/opt/micro
    Soft/SQLNCLI/lib)
    (PROGRAM = dg4odbc)
    )
    (SID_DESC =
    (SID_NAME = DG4ODBC2)
    (ORACLE_HOME=/home/oracle/product/11.2.0)
    (ENVS=LD_LIBRARY_PATH=/usr/lib64:/home/oracle/product/11.2.0/lib:/opt/micr
    OSoft/SQLNCLI/lib)
    (PROGRAM = dg4odbc)
    )
    )

    LISTENER_GW =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = usvcltprdoragw) (PORT = 1521))
    )
    )

    tnsnames.ora

    DG4ODBC =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp)(HOST=usvcltprdoragw) (PORT = 1521))
    (CONNECT_DATA = (SID = DG4ODBC))
    (HS = OK)
    )

    DG4ODBC2 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp)(HOST=usvcltprdoragw) (PORT = 1521))
    (CONNECT_DATA = (SID = DG4ODBC2))
    (HS = OK)
    )

    I can't understand why the named instance is not working but the other is. Any help would be greatly appreciated!

    Have you checked with the ODBC test utility isql (it is installed by default when you install the unixODBC Driver Manager) If your ODBC driver can connect at all to this named instance? I doubt it will work either as there was that a blog has commented by MS engineer:

    Presenting the new ODBC drivers from Microsoft for SQL Server - Microsoft SQLNCli - Site Home - MSDN Articles team blog

    which States that the instance named connections are not supported using this driver.

    -Klaus

  • How do I get the instance name in the code to filter using different filters

    Hello

    I tried to read the name of the instance in my filter code using the code below

    String instanceName = binder.getEnvironmentValue ("IDC_Name");

    It worked very well for the validateStandard filter, but when using the afterExportBatch filter or afterImportBatch it gives null as a value. Could someone suggest a solution to read this value...


    Thank you...

    afterImportBatch recovered the value without problems for me in gR 10, 3.

    afterExportBatch is not a valid filter; afterArchiveBatchFile is the correct filter, but I got a null so...

    Try to use the afterDoArchivingExport and afterDoArchivingImport filters to see if they serve your purpose. You won't get a null value for the latter.

Maybe you are looking for