HEELLLLP with abstract data types(ie. interfaces)

Hello Java World,
I have a few questions regarding abstract data types(ADT) such as interfaces, etc.
1. Which of the following is allowed in Java ?
interface TA extends student, Employee
class teachAssist implements TA, Cloneable, Sortable{..}
2. ADTs cannot be instantiated only extended/implemented(coded)??
3. Can a interface implements/extend classe(s)?
4. Why is a Vector not an ADT? Is it because it contains implementations for its some of its methods?
Thanks for the help, in advance!!
RahimS

Hello Java World,
I have a few questions regarding abstract data
types(ADT) such as interfaces, etc.
1. Which of the following is allowed in Java ?
interface TA extends student, Employee
{...}Allowed (if student and Employee are also Interfaces).
class teachAssist implements TA, Cloneable,
Sortable{..}Allowed.
>
2. ADTs cannot be instantiated only
extended/implemented(coded)??True.
3. Can a interface implements/extend classe(s)?No. An interface simply defines a skeleton...says what methods are present in classes that implement it...therefore an interface cannot 'implement' anything. It may however extend other Interfaces.
4. Why is a Vector not an ADT? Is it because it
contains implementations for its some of its methods?A Vector is not an ADT because it is fully implemented (it contains implementations for ALL of its methods).
>
>
Thanks for the help, in advance!!
RahimS

Similar Messages

  • What is Abstract Data type ?

    Shall i call a class to be an Abstract data type ?

    jverd wrote:
    I do not agree. For one thing, I'd consider classes realizations or implementations of ADTs. That nitpick aside, however, the easiest counterexample is a class with no member variables. The "D" of "ADT" is missing there. I wouldn't consder java.lang.Math and ADT, just a collection of functions and constants.I wouldn't say being implemented in a specific language takes anything away from an ADT. An implemented ADT is also an ADT.
    Being an ADT doesn't require the existence of state. This was what you meant with "no member variables" right? ADTs can have or not have state.
    Your final counterexample concerns so called free functions and constants (static in Java). They should be viewed as part of an ADT definition. But okay, Math itself cannot be considered an ADT so not every class, interface and enum is an ADT as I claimed. Sometimes they're used as namespaces for free functions and constants that have no natural home. Functions and constants associated with primitives have to go somewhere for example. But this usage is atypical.

  • New Effective CAL essay: How do I create an abstract data type in CAL?

      <p><strong>How do I create an abstract data type in CAL?</strong></p>  <p> </p>  <p>An <em>abstract data type</em> is one whose internal representation can be changed without needing to modify the source code of client modules that make use of that type. For software maintainability, it is a good idea to make a type that is subject to change or enhancement into an abstract data type. Another reason to create an abstract data type is to enforce invariants for values of the type that can only be ensured by using <em>constructor functions</em> (i.e. functions that return values of that type).</p>  <p> </p>  <p>In principle it is simple to create an abstract data type in CAL. For an algebraic data type, make the type constructor public and all data constructors private. For a foreign data type, make the type constructor public and the implementation scope private. If a scope qualifier is omitted, the scope is taken to be private.</p>  <p> </p>  <p>For example, the Map algebraic data type has the public type constructor Map and the data constructors Tip and Bin are each private, so it is an abstract data type.</p>  <p> </p>  <p>/** A map from keys (of type {@code k@}) to values</p>  <p>   (of type {@code a@}). */</p>  <p><strong>data</strong> <strong>public</strong> Map k a <strong>=</strong></p>  <p>    <strong>private</strong> Tip <strong>|</strong></p>  <p>    <strong>private</strong> Bin</p>  <p>        size      <strong>::</strong> <strong>!</strong>Int</p>  <p>        key       <strong>::</strong> <strong>!</strong>k</p>  <p>        value     <strong>::</strong> a</p>  <p>        leftMap   <strong>::</strong> <strong>!(</strong>Map k a<strong>)</strong></p>  <p>        rightMap  <strong>::</strong> <strong>!(</strong>Map k a<strong>);</strong></p>  <p><strong> </strong></p>  <p><strong> </strong></p>  <p>There are a number of invariants of this type: the size field represents the number of elements in the map represented by its Bin value. The keys in leftMap are all less than key, which in turn is less than all the keys in rightMap.  In particular, non-empty Map values can only be created if the key parameter type is a member of the Ord type class.</p>  <p> </p>  <p>Values of the Map type can be created outside the Cal.Collections.Map module only by using constructor functions such as insert:</p>  <p> </p>  <p>insert <strong>::</strong> Ord k <strong>=></strong> k <strong>-></strong> a <strong>-></strong> Map k a <strong>-></strong> Map k a<strong>;</strong></p>  <p><strong>public</strong> insert <strong>!</strong>key value <strong>!</strong>map <strong>= ...</strong></p>  <p> </p>  <p>The owner of the Cal.Collections.Map module must ensure that all invariants of the Map type are satisfied, but if this is done, then it will automatically hold for clients using this function.</p>  <p> </p>  <p>Some examples of foreign abstract data types are Color, StringNoCase  and RelativeDate:</p>  <p> </p>  <p><strong>data</strong> <strong>foreign</strong> <strong>unsafe</strong> <strong>import</strong> <strong>jvm</strong> <strong>private</strong> "java.awt.Color"</p>  <p>    <strong>public</strong> Color<strong>;</strong></p>  <p><strong> </strong></p>  <p><strong>data</strong> <strong>foreign</strong> <strong>unsafe</strong> <strong>import</strong> <strong>jvm</strong> <strong>private</strong> "java.lang.String"</p>  <p>    <strong>public</strong> StringNoCase<strong>;</strong></p>  <p><strong> </strong></p>  <p><strong>data</strong> <strong>foreign</strong> <strong>unsafe</strong> <strong>import</strong> <strong>jvm</strong> <strong>private</strong> "int"</p>  <p>    <strong>public</strong> RelativeDate<strong>;</strong></p>  <p> </p>  <p>The private implementation scope for Color means that a foreign function whose type involves Color can only be declared in the Cal.Graphics.Color module where the Color type is defined. A foreign function declaration involving the Color type relies on the compiler knowing that the Color type corresponds to java.awt.Color to resolve the corresponding Java entity i.e. it must know about the implementation of the Color type. Having a private implementation scope means that the Color type can be changed to correspond to a different Java class, or indeed to be an algebraic type, without the risk of breaking client code.</p>  <p> </p>  <p>In all these three cases there are useful, and different, design reasons to adopt a private implementation scope:</p>  <p> </p>  <p>For RelativeDate, the Java implementation type int represents a coded Gregorian date value in the date scheme used by Crystal Reports. Not all int values correspond to valid dates, and the algorithm to map an int to a year/month/day equivalent is fairly complicated, taking into account things like Gregorian calendar reform. Thus, it is desirable to hide the implementation of this type.</p>  <p> </p>  <p>For StringNoCase, the implementation is more straightforward as a java.lang.String. The reason to adopt a private implementation scope is to ensure that all functions involving StringNoCase preserve the semantics of StringNoCase as representing a case-insensitive string value. Otherwise it is very easy for clients to declare a function such as:</p>  <p> </p>  <p><strong>foreign</strong> <strong>unsafe</strong> <strong>import</strong> <strong>jvm</strong> "method replace"</p>  <p>    replaceChar <strong>::</strong> StringNoCase <strong>-></strong> Char <strong>-></strong> Char <strong>-></strong> StringNoCase<strong>;</strong></p>  <p> </p>  <p>which does not handle case-insensitivity correctly, but is a perfectly valid declaration. This declaration results in a compilation error when it is placed outside the module in which StringNoCase is defined because of the private implementation scope of StringNoCase.</p>  <p> </p>  <p>For Color, the issue is somewhat more subtle. The java.awt.Color implementation type is semantically the same as the CAL Color type. The problem is that java.awt.Color is mutable (since it can be sub-classed to create a mutable type). It is preferable for a first-class CAL type to not be mutable, so we simply make the implementation scope private to ensure that this will be the case. </p>  <p> </p>  <p>A somewhat less encapsulated kind of abstract data type can be created using <em>friend modules </em>and <em>protected</em> scope. For example, if an algebraic type is public, and all its data constructors are protected, then the data constructors can be accessed in the friend modules of the module in which the type is defined. Effectively this means that the implementation of the semantics of the type stretches over the module in which the type is defined, and all of its friend modules. These must all be checked if the implementation of the type is modified. </p>  <p> </p>  <p>Given the merits of abstract data types discussed above, it is perhaps surprising that most of the core types defined in the Prelude module are not abstract data types. For example: Boolean, Char, Int, Double, String, List, Maybe, Either, Ordering, JObject, JList, and all record and tuple types are non-abstract types. </p>  <p> </p>  <p>There are different reasons for this, depending on the particular type involved. </p>  <p> </p>  <p>For example, Boolean, List, Maybe, Either and Ordering are all rather canonical algebraic data types with a long history in functional languages, with many standard functions using them. They are thus guaranteed never to change. In addition, their values have no particular design invariants that need to be enforced via constructor functions. Exposing the data constructors gives clients some additional syntactic flexibility in using values of the type. For example, they can pattern match on the values using case expressions or let patterns.</p>  <p> </p>  <p>Essentially the same explanation holds for record and tuple types. Although non-tuple record types are less canonical, they do correspond to the fundamental notion of an anonymous named-field product type. The "anonymous" here simply means that the programmer can create an entirely new record type simply by creating a value; the type does not have to be declared anywhere prior to use.</p>  <p> </p>  <p>Char, Int, Double, String, JObject and JList are foreign types where in fact part of the semantics of the type is that we want clients to know that the type is a foreign type. For example, we want clients to know that Prelude.Int is essentially the Java primitive unboxed int type, and has all the semantics you would expect of the Java int type i.e. this is quite different from RelativeDate which is using int as its implementation type in a very tactical way that we may choose to change. One can think of a public foreign type declaration with public implementation scope as simply introducing the Java type into the CAL namespace.</p>  <p> </p>  <p>One interesting point here is with CAL&#39;s naming convention for public foreign types. We prefix a type name by "J" (for "Java") for foreign types with public implementation type such that the underlying Java type is mutable. This is intended as mnemonic that the type is not a pure functional type and thus some caution needs to be taken when using it. For example, Prelude.JObject has public Java implementation type java.lang.Object.</p>  <p> </p>  <p>In the case where the underlying Java type is not mutable, we do not use the prefix, since even though the type is foreign; it is basically a first class functional type and can be freely used without concern. For example, Prelude.String has public Java implementation type java.lang.String.</p>  <p> </p>  <p>In the case where the implementation type is private, then the fact that the type is a foreign type, whether mutable or not, is an implementation detail and we do not hint at that detail via the name. Thus Color.Color has as its private Java implementation type the mutable Java type java.awt.Color. </p>  <p> </p>  <p>When creating abstract data types it is important to not inadvertently supply public API functions that conflict with the desired public semantics of the type. For example, if the type is publicly a pure-functional (i.e. immutable) type such as Color, it is important not to expose functions that mutate the internal Java representation.</p>  <p> </p>  <p>A more subtle case of inadvertently exposing the implementation of a type can occur with derived instances. For example, deriving the Prelude.Outputable and Prelude.Inputable type classes on a foreign type, whose implementation type is a mutable Java reference type, allows the client to gain access to the underlying Java value and mutate it
    (by calling Prelude.output, mutating, and then calling Prelude.input). The solution in this case is to not derive Inputable and Outputable instances, but rather to define a custom Inputable and Outputable instance that copies the underlying values.</p>

    Hi Pandra801,
    When you create a the external content type, please try to add a filter based on your select statement.
    http://arsalkhatri.wordpress.com/2012/01/07/external-list-with-bcs-search-filters-finders/
    Or, try to create a stored procedure based on your select statement, then create ECT using the SQL stored procedure.
    A step by step guide in designing BCS entities by using a SQL stored procedure
    http://blogs.msdn.com/b/sharepointdev/archive/2011/02/10/173-a-step-by-step-guide-in-designing-bcs-entities-by-using-a-sql-stored-procedure.aspx
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Working with complex data types in web services ...

    Hi All,
    I have created a webservice and created an interface for that in ADF. Now as my web service returns a complex data type, i followed the steps given in this article "http://www.oracle.com/technology/products/jdev/howtos/1013/wsadf/adfcomplexwstypes.html" and it works fine, my results also get displayed. But only issue is i get a warning "JBO-25009: Cannot create an object of type:java.util.calendar with value:2008-09-23T23:51:30.000+05:30" and if i replace all the java.util.Date with oracle.jbo.domain.Date then i get a warning "JBO-25009: Cannot create an object of type:oracle.jbo.domain.Date with value:2008-09-23T23:51:30.000+05:30". Now i am unable to understand this although i believe it is a data type mapping issue, but not sure how to rectify it.
    Anybody knows the wayout?
    Regards
    Lokesh

    Andre,
    Thanks for youe response. I also tried makeing data type as string in place of date in data control.xml and it worked fine. So it confirms that i am facing with exactly similar issue as yours.
    I tried solution 2 mentioned in Frank's mail but its not helping[in fact i am already using web proxy as i am delaing with complex data types]. I created a web proxy and in java bean i placed break points to check the control flow[in order to check the root cause] but control never reaches the java bean!! I am not sure about the cause for it...control should pass through java bean isn't it??
    I am quite new to SOA...so can somebody just elaborate on how to rectify this using web proxy. I have been using this rl "http://www.oracle.com/technology/products/jdev/howtos/1013/wsadf/adfcomplexwstypes.html" to work with web proxies" to work with proxies.
    Regards
    Lokesh

  • How Abstract class differ, When we call class to be Abstract data type?

    We say as Classes as a realization of Abstract data types, then why should we declare that to be abstract ?
    Hope, the key word Abstract in both ADT and abstract classname mean the same.!!!!

    No, abstract is in the case of "abstract data type" a more general term, whereas in "abstract class" it is a technical term in Java.
    Are you not satisfied with the answers here?
    http://forum.java.sun.com/thread.jspa?threadID=5303930&messageID=10297137#10297137

  • How to insert data in a column with uniqueidefier data type

    Guys,
    I need insert data in a column with uniqueidefier data type, when i am trying to that getting error.
    error message says: "Conversion failed when converting from a character string to uniqueidentifier."
    I have data in table a col1,col2,col3,col4 - col3,col4 has datatype as varchar and i am updating table b columns col1,col2 with table a col3 and col4.
    Please guide how to do it.

    Hi,
    Not any String can be convert to uniqueidentifier.
    1. you have to make sure u use a value which is fir to be uniqueidentifier
    2. Use convert or cast in the insert query in order to convert the string into uniqueidentifier
    insert X ... convert(uniqueidentifier, 'string which fit to be convert to uniqueidentifier')
    Please post DDL+DML for more specific help
    DDL = Data Definition Language. In our case that is, CREATE TABLE statements for your tables and other definitions that are needed to understand your tables structure and there for let us to test and reproduce the problem in our server. Without DDL no one
    can execute any query.
    How to get DDL: Right click on the table in Object Explorer and select script table as CREATE. Post these create table scripts here.
    DML = data manipulation language is a family of queries used for manipulating the data it self like: inserting, deleting and updating data. In our case we need some sample data in order to check the query and get result, so we need some indert query for
    sample data.
    If you post a "create query" for the tables and "insert query" with some sample, then we could help you without Assuming/Guessing. There is a reason that DDL is generally asked for and expected when discussing query problems - it helps
    to identify issues, clarify terminology and prevent incorrect assumptions.  Sample data also provides a common point of reference for the discussion. A script that can be used to illustrate or reproduce the issue you have, will encourage others to help.
    [Personal Site] [Blog] [Facebook]

  • Same Input name with different data type cause the reflection exception

    I have a proxy contains couple RFCs. Two RFCs contain an argument named IN_COMPANY_CODE with data type of ZTRE_FX_BUKRSTable. Another RFC contains the same argument name of IN_COMPANY_CODE but hold different data type (String). All RFCs are in the same proxy. Complie and build the application with no issue.
    But when I ran the RFC, it generates the reflection exception below:
    Method SAPProxy1.Z_F_Tre_R_Pre_Trade_Fx can not be reflected. --> There was an error reflecting 'In_Company_Code'. > The XML element named 'IN_5fCOMPANY_--5fCODE' from namespace '' references distinct types System.String and MSTRFOREX.ZTRE_FX_BUKRSTable. Use XML attributes to specify another XML name or namespace for the element or types.
    I realize the conflict introduced by the same name with difference data type. But I would like to know if this is fixable as a bug or if there is any best practice and/or some manual intervention to make it work.

    Please install fix from OSS note 506603. After this, right-click .sapwsdl file and select "Run custom tool".

  • Call a method with complex data type from a DLL file

    Hi,
    I have a win32 API with a dll file, and I am trying to call some methods from it in the labview. To do this, I used the import library wizard, and everything is working as expected. The only problem which I have is with a method with complex data type as return type (a vector). According to this link, import library wizard can not import methods with complex data type.
    The name of this method is this:   const std::vector< BlackfinInterfaces::Count > Counts ()
    where Count is a structure defined as below:
    struct Count
       Count() : countTime(0) {}
       std::vector<unsigned long> countLines;
       time_t countTime;
    It seems that I should manually use the Call Library Function Node. How can I configure parameters for the above method?

    You cannot configure Call Library Function Node to call this function.  LabVIEW has no way to pass a C++ class such as vector to a DLL.

  • JDBC insert with XMLTYPE data type

    Hi,
    SOAP to JDBC scenario. Oracle 11G as a receiver.
    Requirement is to  insert whole xml payload message in one of Oracle table fields as a xml string. Target oracle DB table column is defined with XMLTYPE data type, it has capacity to hold xml data more than 4GB. I am using graphical mapping with direct INSERT statement.
    When I try to insert xml payload with smaller size transaction goes through. However when the xml payload size increases it is giving following error in JDBC receiver communication channel monitoring.
    Could not execute statement for table/stored proc. "TABLE_NAME" (structure "StructName") due to java.sql.SQLException: ORA-01704: string literal too long
    Here is insert statement as in communication channel monitoring. (Note: XML payload with bold characters is truncated)
    INSERT INTO  TABLE_NAME (REQ_ID, OUTAGE_OBJ, TIMESTAMP, PROCESSED_FLAG) VALUES (VAL1, <?xml version="1.0" encoding="UTF-8"?>............</>, TO_DATE(2010-11-15 10:21:52,YYYY-MM-DD HH24:MI:SS), N)
    Any suggestions to handle this requirement?
    Thank you in advance.
    Anand More.

    Hi Anand,
    The problem here is definitely the length of the SQL query. i.e "INSERT INTO ......... VALUES......."
    This is what i got when i searched for this ORACLE error code:
    ORA-01704: string literal too long
    Cause: The string literal is longer than 4000 characters.
    Action: Use a string literal of at most 4000 characters. Longer values may only be entered using bind variables.
    Please ask a ORACLE DB expert on how to handle this Also i am not sure how can we handle Bind Varibales in SAP PI.
    I hope this helps.
    Regards, Gaurav.

  • Check box with Boolean data type is not behaving properly

    Hi,
    I create a sample application with one entity driven view object with two attributes. One is of String data type [Value will be Y/N] and another (transient) attribute with Boolean data type. I planned to bind this boolean data type attribute to UI. I overridded the view row impl class and included setting of boolean attribute inside the setter of String attribute. Also in the getter of boolean attribute, added code to check the string attribute and return true/false based on that. Everything is working fine in application module tester. But when i test the same in view controller project in a page, it is not working. Always Check box component is not checked eventhough when i explicitly check it.
    [NOTE: I have given the control hint of Boolean attribute as check_box. Also i don't want selected/unselected entries in the page def file. That's why followed this approach]
    Have i missed out anything? Why this behaviour.
    Thanks in advance.
    Raguraman

    what is the value that is going in when u check it.. did u debug it.. is the viewRowimps setter and getter getting called.. and is it having the right value set and got.. and ur sure that ur using selectBooleanCheckBox..
    ur binding the checkbox to the transient value right??

  • Problem with bool data type in overloading

    Please find the following error.
    I did following typedef:
    typedef bool Boolean;
    typedef signed int Sint32;
    Problem description:
    This error is occurring because Sun CC 5.9 or Solaris 9 g++ considers bool data type as signed Integer, when passed as an constructor argument. First, it is overloading the constructor with �bool� data type and when it comes the turn of �signed integer� to overload constructor, the compiler is giving an error �cannot be overloaded�. The error �redefinition� is also due to bool data type.
    Could please let me know, whether i need to add ant compiler option on Sun CC
    ERROR in g++:-
    ( /usr/local/bin/g++ -DSOLARIS_PLATFORM -DUNIX -DPEGASUS_PLATFORM_SOLARIS_SPARC_GNU -DPEGASUS_OS_SOLARIS -DPEGASUS_HAVE_TEMPLATE_SPECIALIZATION -DEXPAND_TEMPLATES -DPEGASUS_USE_EXPERIMENTAL_INTERFACES -Wno-non-template-friend -DTEST_VAI -D__EXTERN_C__ -Dregister= -D_POSIX_PTHREAD_SEMANTICS -Wno-deprecated -DAUTOPASS_DISABLED -DCLUSTER_GEN_APP -DSTAND_ALONE_INTEG -I"/TESTBUILD/p2.08.00/TESTsrc" -I/TESTBUILD/pegasus/src -I"/TESTBUILD/p2.08.00/TESTCommonLib" -O -c -o /TESTBUILD/p2.08.00/TESTobj/TESTBase.o /TESTBUILD/p2.08.00/TESTsrc/TESTBase.cpp );
    In file included from /TESTBUILD/pegasus/src/Pegasus/Common/Array.h:74,
    from /TESTBUILD/pegasus/src/Pegasus/Common/CIMName.h:40,
    from /TESTBUILD/pegasus/src/Pegasus/Client/CIMClient.h:39,
    from /TESTBUILD/v2.08.00/TESTsrc/TESTVAIInterface.h:4,
    from /TESTBUILD/v2.08.00/TESTsrc/TESTCaVAI.h:24,
    from /TESTBUILD/v2.08.00/TESTsrc/TESTBase.h:11,
    from /TESTBUILD/v2.08.00/TESTsrc/TESTBase.cpp:1:
    /TESTBUILD/pegasus/src/Pegasus/Common/ArrayInter.h:49: error: redefinition of `class Pegasus::Array<Pegasus::Boolean>'
    /TESTBUILD/pegasus/src/Pegasus/Common/ArrayInter.h:49: error: previous definition of `class Pegasus::Array<Pegasus::Boolean>'
    In file included from /TESTBUILD/pegasus/src/Pegasus/Common/MessageLoader.h:42,
    from /TESTBUILD/pegasus/src/Pegasus/Common/Exception.h:44,
    from /TESTBUILD/pegasus/src/Pegasus/Common/CIMName.h:41,
    from /TESTBUILD/pegasus/src/Pegasus/Client/CIMClient.h:39,
    from /TESTBUILD/v2.08.00/TESTsrc/TESTVAIInterface.h:4,
    from /TESTBUILD/v2.08.00/TESTsrc/TESTCaVAI.h:24,
    from /TESTBUILD/v2.08.00/TESTsrc/TESTBase.h:11,
    from /TESTBUILD/v2.08.00/TESTsrc/TESTBase.cpp:1:
    /TESTBUILD/pegasus/src/Pegasus/Common/Formatter.h:114: error: `Pegasus::Formatter::Arg::Arg(Pegasus::Sint32)' and `Pegasus::Formatter::Arg::Arg(Pegasus::Boolean)' cannot be overloaded
    In file included from /TESTBUILD/pegasus/src/Pegasus/Common/CIMProperty.h:40,
    from /TESTBUILD/pegasus/src/Pegasus/Common/CIMObject.h:42,
    from /TESTBUILD/pegasus/src/Pegasus/Client/CIMClient.h:41,
    from /TESTBUILD/v2.08.00/TESTsrc/TESTVAIInterface.h:4,
    from /TESTBUILD/v2.08.00/TESTsrc/TESTCaVAI.h:24,
    from /TESTBUILD/v2.08.00/TESTsrc/TESTBase.h:11,
    from /TESTBUILD/v2.08.00/TESTsrc/TESTBase.cpp:1:
    /TESTBUILD/pegasus/src/Pegasus/Common/CIMValue.h:92: error: `Pegasus::CIMValue::CIMValue(Pegasus::Sint32)' and `Pegasus::CIMValue::CIMValue(Pegasus::Boolean)' cannot be overloaded
    /TESTBUILD/pegasus/src/Pegasus/Common/CIMValue.h:147: error: `Pegasus::CIMValue::CIMValue(const Pegasus::Array<Pegasus::Boolean>&)' and `Pegasus::CIMValue::CIMValue(const Pegasus::Array<Pegasus::Boolean>&)' cannot be overloaded
    /TESTBUILD/pegasus/src/Pegasus/Common/CIMValue.h:291: error: `void Pegasus::CIMValue::set(Pegasus::Sint32)' and `void Pegasus::CIMValue::set(Pegasus::Boolean)' cannot be overloaded
    /TESTBUILD/pegasus/src/Pegasus/Common/CIMValue.h:323: error: `void Pegasus::CIMValue::set(const Pegasus::Array<Pegasus::Boolean>&)' and `void Pegasus::CIMValue::set(const Pegasus::Array<Pegasus::Boolean>&)' cannot be overloaded
    /TESTBUILD/pegasus/src/Pegasus/Common/CIMValue.h:377: error: `void Pegasus::CIMValue::get(Pegasus::Sint32&) const' and `void Pegasus::CIMValue::get(Pegasus::Boolean&) const' cannot be overloaded
    /TESTBUILD/pegasus/src/Pegasus/Common/CIMValue.h:409: error: `void Pegasus::CIMValue::get(Pegasus::Array<Pegasus::Boolean>&) const' and `void Pegasus::CIMValue::get(Pegasus::Array<Pegasus::Boolean>&) const' cannot be overloaded
    *** Error code 1
    make: Fatal error: Command failed for target `/TESTBUILD/v2.08.00/TESTsrc/TESTBase.or'
    Same ERROR in Sun CC:-
    palace /TESTBUILD/p2.08.00/TESTobj-> make -ef Make_SolarisVAICC TESTVAIrun
    ( /sun-share/SUNWspro/bin/CC -DSOLARIS_PLATFORM -DUNIX -DPEGASUS_PLATFORM_SOLARIS_SPARC_CC -features=bool -DPEGASUS_USE_EXPERIMENTAL_INTERFACES -DTEST_VAI -DEXPAND_TEMPLATES -D__EXTERN_C__ -DPEGASUS_INTERNALONLY -DPEGASUS_OS_SOLARIS -DPEGASUS_USE_EXPERIMENTAL_INTERFACES -DPEGASUS_USE_DEPRECATED_INTERFACES -Dregister= -D_POSIX_PTHREAD_SEMANTICS -DCLUSTER_GEN_APP -DSTAND_ALONE_INTEG -I"/TESTBUILD/v2.08.00/TESTsrc" -I"/Pegasus/pegasus-2.5/src" -I"/TESTBUILD/p2.08.00/TESTCommonLib" -O -c -o /TESTBUILD/p2.08.00/TESTobj/TESTBase.o /TESTBUILD/p2.08.00/TESTsrc/TESTBase.cpp );
    "/Pegasus/pegasus-2.5/src/Pegasus/Common/ArrayInter.h", line 47: Error: Multiple declaration for Pegasus::Array<int>.
    "/Pegasus/pegasus-2.5/src/Pegasus/Common/Formatter.h", line 103: Error: Multiple declaration for Pegasus::Formatter::Arg::Arg(int).
    "/Pegasus/pegasus-2.5/src/Pegasus/Common/CIMValue.h", line 90: Error: Multiple declaration for Pegasus::CIMValue::CIMValue(int).
    "/Pegasus/pegasus-2.5/src/Pegasus/Common/CIMValue.h", line 145: Error: Multiple declaration for Pegasus::CIMValue::CIMValue(const Pegasus::Array<int>&).
    "/Pegasus/pegasus-2.5/src/Pegasus/Common/CIMValue.h", line 289: Error: Multiple declaration for Pegasus::CIMValue::set(int).
    "/Pegasus/pegasus-2.5/src/Pegasus/Common/CIMValue.h", line 321: Error: Multiple declaration for Pegasus::CIMValue::set(const Pegasus::Array<int>&).
    "/Pegasus/pegasus-2.5/src/Pegasus/Common/CIMValue.h", line 375: Error: Multiple declaration for Pegasus::CIMValue::get(int&) const.
    "/Pegasus/pegasus-2.5/src/Pegasus/Common/CIMValue.h", line 407: Error: Multiple declaration for Pegasus::CIMValue::get(Pegasus::Array<int>&) const.
    Thank and Regards,
    Dileep

    In Sun C++, type bool is not equivalent to signed int. I don't think g++ makes it equivalent either.
    Please show an example of source code that is causing the problem.

  • Error ORA-01426: numeric overflow when Creating table with double data type

    Hi,
    I am using ODP.NET to create a table with data from SQL to Oracle. The problem is with double data type fields that is equivalent to FLOAT(49) in Oracle. My syntax is:
    CREATE TABLE SCOTT.ALLTYPES
    F1 NUMBER(10),
    F10 DATE,
    F2 NUMBER(10),
    F3 NUMBER(5),
    F4 NUMBER(3),
    F5 FLOAT(23),
    F6 FLOAT(49),
    F7 NUMBER (38,5),
    F8 NVARCHAR2(500),
    F9 NVARCHAR2(500)
    Th error is with field F6 but I am not sure what is the correct type equivalent to double in SQL.
    I woul appreciate if anyone can help me with this problem.
    Sunny

    Does this simple test work for you?
    In database:
    create table float_test
      f1 float(49)
    );C# code:
    using System;
    using System.Data;
    using System.Text;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace FloatTest
      /// <summary>
      /// Summary description for Class1.
      /// </summary>
      class Class1
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
          // connect to local db using o/s authenticated account
          OracleConnection con = new OracleConnection("User Id=/");
          con.Open();
          // will hold the value to insert
          StringBuilder sbValue = new StringBuilder();
          // create a string of 49 number 9's
          for (int i = 0; i < 49; i++)
            sbValue.Append("9");
          // command object to perform the insert
          OracleCommand cmd = con.CreateCommand();
          cmd.CommandText = "insert into float_test values (:1)";
          // bind variable for the value to be inserted
          OracleParameter p_value = new OracleParameter();
          p_value.OracleDbType = OracleDbType.Double;
          p_value.Value = Convert.ToDouble(sbValue.ToString());
          // add parameter to collection
          cmd.Parameters.Add(p_value);
          // execute the insert operation
          cmd.ExecuteNonQuery();
          // clean up
          p_value.Dispose();
          cmd.Dispose();
          con.Dispose();
    }SQL*Plus after executing above code:
    SQL> select * from float_test;
            F1
    1.0000E+49
    1 row selected.- Mark

  • Ho to Comapre with Number Data Type

    hi
    My reqt is to do validation in ValidateEntity Method.
    How to compare the with Number Data type:
    For ex: Number a = gatAbc();
    If(a>10)
    throw new oaExcption...
    But while comapring i got compiler Error
    Error(218,17): method >(oracle.jbo.domain.Number, int) not found in class abc.oracle.apps.per.irc.pqr.schema.server.XxabcEOImpl
    So plz tell me how to compare the integer value with Number data type
    Thanx

    Check with float. It will work definitely.
    float number = Float.parseFloat(HrsPerDay); //HrsPerDay is a String and I am converting it to float
    if(( number <= 0) || (number >= 21))
                            throw new OAAttrValException(OAAttrValException.TYP_VIEW_OBJECT,
                                              "xxCopyResourceVO1",
                                              rowi.getKey(),
                                              "NoOfCopies",
                                              rowi.getAttribute("NoOfCopies"),
                                              "PA",
                                              "xx_xx_COPY_POSITIVE_NUM");
                       }Here in this code i am also checking that the Hours cannot be less then 0 and greater than 20.
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem with packed data type variable?

    Hi all,
    I have a problem while doing calculations with packed data type variables . As they are saving in the format '0,00'. so unable to do calulations because of ',' . 
    To convert these fields into str and replacing ',' with '.' is very time consuming because i have many packed data type variables.
    Can you please provide any other alternative for over coming this problem? Is there any option while defining these variables?
    Thanks,
    Vamshi.

    Hi VAMSHI KRISHNA,
    First check out SU01 Tcode (if u don't have permission then u can ask BASIS to do it)
    Enter User Name
    Execute
    Goto Defaults Tab
    Check Out Decimal Notation here... set it 1,234,567.89
    SAVE it
    Log Off once and again login with the same user id and check the result...
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7

  • Creating Web service for PL/SQL Procedure with Complex Data Types

    I need to created web service for PL/SQL Procedure with Complex Data types like table of records as parameters, how do we map the pl/sql table type parameters with web service, how to go about these?

    Hello,
    When you are creating a service from a Stored Procedure, the OracleAS WS tools will create necessary Java and PL wrapper code to handle the complex types (table of record) properly and make them compatible with XML format for SOAP messages.
    So what you should do is to use JDeveloper or WSA command line, to create a service from your store procedure and you will see that most of the work will be done for you.
    You can find more information in the:
    - Developing Web Services that Expose Database Resources
    chapter of the Web Service Developer's guide.
    Regards
    Tugdual Grall

Maybe you are looking for

  • Discussion About The Use Of Project Server 2013 Timesheet Custom Billing Categories (Post SP1 and April 2014 CU Install)

    In support of a consulting company using timesheet custom billing categories to designate project time as billable onsite, billable offsite, and non-billable, I've encountered a series of issues which appear to be associated with the custom billing c

  • How to set up an external Hard Drive as a cloud folder for remote users?

    I have an external HD connected to my MacBook Air that I need two other people in my company to be able to access from far away cities. I'd like to know if there is a way of them having a folder in finder that goes straight to this external, similar

  • Idoc configurations in PI7.3

    Hi Experts, For an Idoc scenario prior to PI 7.3, RFC destination, port, logical system and partner profile needs to be created in case of outbound Idoc scenario and again at XI side we need to create RFC destination, port and loading of meta data...

  • Pc Card in PB3400

    today i bought a usb 2.0 pc card adapter,(i have investigated about my pb before buy) but when i try to insert this , the slot doesnt accept the card(my pb supports cardbus but i dont know what). Otherwise, i dont have the pc card extension, i dont h

  • Icloud mail fails after update to firefox 8 on windows 7 pc

    I have upgraded to firefox 8.0 and when I try to go to the www.icloud.com site a dialog box pops saying that "Mail unexpectedly stopped"  The error is b.push is not a function.  I have forwarded the error box to Apple.  I can see mail using safari or