Is it possible to serialize a user created object with an oracle.sql.BLOB?
Is this possible? Cause I'm getting a WSDL Exception that the oracle.sql.BLOB is not a java bean. So how do I make it a java bean? What data type should I use?
here is the object that was created.
import java.io.Serializable;
public class DiagramsObj implements Serializable {
private int galleyDiagramId = -1;
oracle.sql.BLOB galleyDiagramBlob = null;
private String galleyName = null;
/** SET THE VALUES TO THE OBJECT */
public void setGalleyDiagramId(int newGalleyDiagramId) {
galleyDiagramId = newGalleyDiagramId;
public int getGalleyDiagramId() {
return galleyDiagramId;
public void setGalleyDiagramBlob(oracle.sql.BLOB newGalleyDiagramBlob) {
galleyDiagramBlob = newGalleyDiagramBlob;
public oracle.sql.BLOB getGalleyDiagramBlob() {
return galleyDiagramBlob;
public void setGalleyName(String newGalleyName) {
galleyName = newGalleyName;
public String getGalleyName() {
return galleyName;
}
Similar Messages
-
How to create a counter using Oracle SQL Developer?
Is there any way to create a counter using Oracle SQL Developer to create the below scenario. Meaning it will recorded down the name of user and ID and time and the date they login.
Library portal home statistics shows how many users (outside and within the campus) visit the library portal.
Page Access statistics is recorded on an hourly basis. Users may select the statistics by
yearly (statistics displayed by all months in the selected year)
monthly (statistics displayed by all days in the selected month)
daily (statistics displayed by all hours in the selected day)I'm giving here one basic post - hope this will solve your problem --
SQL>
SQL>
SQL> create table audit_info
2 (
3 usr varchar2(50),
4 log_time timestamp(6)
5 );
Table created.
SQL>
SQL>
SQL> create table err_log
2 (
3 log_cd varchar2(20),
4 log_desc varchar2(500)
5 );
Table created.
SQL>
SQL>
SQL> create or replace procedure ins_err(errcd in varchar2,
2 errnm in varchar2)
3 is
4 pragma autonomous_transaction;
5 begin
6 insert into err_log values(errcd,errnm);
7 commit;
8 end;
9 /
Procedure created.
SQL>
SQL>
SQL> create or replace procedure ins_aud(ud in varchar2,
2 unm in varchar2)
3 is
4 pragma autonomous_transaction;
5 begin
6 insert into audit_info values(ud,unm);
7 commit;
8 exception
9 when others then
10 ins_err(sqlcode,sqlerrm);
11 end;
12 /
Procedure created.
SQL>
SQL>
SQL>
SQL> create or replace trigger log_odsuser1
2 after logon on odsuser1.schema
3 begin
4 ins_aud('ODSUSER1',sysdate);
5 exception
6 when others then
7 ins_err(sqlcode,sqlerrm);
8 end;
9 /
Trigger created.
SQL>
SQL*Plus: Release 9.2.0.1.0 - Production on Tue Jun 12 12:21:09 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
SQL>
SQL>
SQL>
SQL> set serveroutput on
SQL>
SQL>
SQL> select * from audit_info;
USR
LOG_TIME
ODSUSER1
12-JUN-07 12.00.00.00000000 AMHope this will solve your purpose.
Regards.
Satyaki De. -
Error creating Objects with Reflection
This is the code:
try{
System.out.println("Restart - test 1 - sub == " + sub);
c = Class.forName(sub);
con = c.getDeclaredConstructor();
catch(NoSuchMethodException e){
System.out.println("Unknown event type\t" + e);
}Output:
Restart - test 1 - sub == Mouse
Unknown event type java.lang.NoSuchMethodException: Mouse.<init>()I have a Mouse class with a declared Constructor. Why can't it find the Constructor?SquareBox wrote:
almightywiz wrote:
Your code is trying to find the default constructor for your Mouse class. If you don't have a default constructor specified, it will throw the exception you encountered. What does your constructor signature look like?
public Mouse(int weight){
this.weight = weight;
}How do I get the Constructor if it contains parameters?This is answered in your other thread: Creating objects with relfections And you even marked it correct!
Please don't post the same question multiple times. It leads to people wasting their time duplicating each others' answers, and makes for a fractured discussion.
Edited by: jverd on Apr 26, 2011 3:59 PM -
Can we create objects with interface
can we create objects with interface,if yes then where we implement the
methods,can we type cast any object with inerface kind of object,if yes what kind
of objects we can type castcan we create objects with interface,if yes then where we implement the
methods
Objects are created with classes, not interfaces, which are abstract.
can we type cast any object with inerface kind of object,if yes what kind
of objects we can type cast
Objects may be cast to interfaces, but only if an object's class or one of its superclasses actually implements the interface. -
Hello
I am curious if this can be done. I guess its a Person object I need to fetch, but how can I refer to it?
What would the XPath look like?
*HHThankyou for the response. Yes indeed those environment variables are documented, but how to use them is not.
Very Hard to use. I just wanted to show the Requester information on the User Create and Edit rcdc screens.
I could only get the UocListView control to work though, but it is sufficient, like so:
<my:Control my:Name="CurrentUser" my:TypeName="UocListView" my:ExpandArea="true" my:Caption="Requester">
<my:Properties>
<my:Property my:Name="ColumnsToDisplay" my:Value="DisplayName,Email,OrganizationalUnit" />
<my:Property my:Name="EmptyResultText" my:Value="" />
<my:Property my:Name="PageSize" my:Value="1"/>
<my:Property my:Name="ShowTitleBar" my:Value="true" />
<my:Property my:Name="ShowActionBar" my:Value="false" />
<my:Property my:Name="ShowPreview" my:Value="false" />
<my:Property my:Name="ShowSearchControl" my:Value="false" />
<my:Property my:Name="EnableSelection" my:Value="false" />
<my:Property my:Name="SingleSelection" my:Value="false" />
<my:Property my:Name="ItemClickBehavior" my:Value="Server" />
<my:Property my:Name="ListFilter" my:Value="/Person[ObjectID='%LoginID%']" />
</my:Properties>
</my:Control>
This gives me a nice 3 column display of the current Requester's Name, Email and Unit. -
Is it possible to retrieve RAD's extended variables with a pl/sql function?
Good morning everyone,
We have our forms and reports(10g) application, SSO enabled and we are using OID on 10g app server. some of our users use smart card to log in to the system and some who do not have smart cards provide their database userid, password and SID.
In the case of users who login with smart card, as a one time effort, they have to register their smart card. At that point OID presents a form prompting for their username, password, sid and then a RAD record is created for that particular user.
And from then on when the user enters the system using his smart card(12345@mil), forms servlet, does the look up of dbusername,dbpswd,sid which belong to the 12345@mil and user's database credentials are passed to the application. The entire application logic is based on that userid which is also an internal userid in the application. Everything is working fine.
I have read the documentation and found that 12345@mil is stored in the "cn" parameter and the orclownerguid and orclusernameattribute are stored under "cn"=extended properties in the oid. I am able to see this from the oid console.
But now I need some help. If I only know the id of the user as "12345@mil" , is it possible to manually query the RAD and retrieve the orclusername from a pl/sql function?
Any help is greatly appreciated.
Regards,
Suma.Please can anyone help me????
Regards,
Suma. -
Is it posible to create objects with different names dinamically?
Hi,
I'm creating an app that manages different wireless nodes in a network and I was thinking that I could create a class called Node which would have a constructor that every time I created an object Node, I would pass the address and some other data about the Node and the constructor will save all that data and also create a unique ID for every Node object.
Now the problem is that I need to be able to discover all the nodes in my network every time the user clicks a Ping button. So every time the users clicks Ping I need to do a ping and create as many Node objects as nodes I have in my network. The thing is I don't know how to make it create the node objects with different names so after I've created all the nodes objects I can refer to one of them.
Something like this.
int Id=0;
id++;
Node node+Id = new Node();
I think its not possible to do something like that. If it isn't how can I do to refer to one of the objects I've created?
Thanks.Twistx77 wrote:
Thanks to both of you. I'll check out the Link and if I can't find the solution there I'll make the array , I don't know how I didn't think about doing that. There are two collections you should study specifically:
First you have the ArrayList which in essense is a growable array. This means you don't have to decide in advance how big it can be.
Second there's the HashMap. It's sometimes called an associate array. Such an array doesn't have fixed position indexes like an ordinary array. Instead each index (called key) is associated with a value but the keys don't have any particular order. Still, given a certain key, finding the corresponding value in a HashMap is almost as fast as an array access. -
How to create sub views in Oracle SQL
I am trying to write a select statement through TOAD that needs to build a view and then query from that view further in the same statement. I don't mean create a VIEW in the common sense of running a CREATE VIEW command, I mean creating one dynamically within an SQL statement. Here's what I mean - in DB2 sql I can write the following:
WITH COUNT_NUM
COUNT_ADS
AS
(SELECT
COUNT(AD_ID)
FROM AD
WHERE CONTRACT_ID = '000234123'
SELECT * FROM COUNT_NUM;
Obviously this is a real simple example but you get the idea. Using this syntax you can create numerous sub-views to build data into your final select. My question is how to do this for Oracle. I have searched tons of help pages and sites but the only reference is to creating permanent views. I do not want to create temporary views either as I do not have adequate system permissions - I only want to create dynamic ones within my SQL.
Thanks in advance for any help!In Oracle, the equivalent concept is known as an in-line view. The Oracle version of your statement is:
SELECT *
FROM (SELECT COUNT(AD_ID) count_ads
FROM AD
WHERE CONTRACT_ID = '000234123')Essentially, you can use an in-line view anywhere you would use a "real" view or a table, so the follwoing is also possible:
SELECT a.contract_id, a.count_ads, b.count_pages
FROM (SELECT contract_id,ad_id,COUNT(*) count_ads
FROM ad
GROUP BY contract_id,ad_id) ads,
(SELECT ad_id,count(*) count_pages
FROM ad_pages
GROUP BY ad_id) ad_pages
WHERE ads.ad_id = ad_pages.ad_idHTH
John -
Creating objects with proper stereotypes
Hi,
I'm just trying to create Architecture Areas and Business Functions using VB. This all works as expected, besides of one small but important exception:
I want to create Architecture Areas and Business Functions of a given type (Stereotype).
When I create the Architecture Area or Business Function, assign the code and name, and then set the Stereotype, everything looks OK. The Stereotype is appearing on the symbol etc., but ... the graphical symbol differs from what we have configured for this element.
In the script I'm doing it this way:
L2Process = EamL2.ArchitectureAreas.CreateNew(PdEam.cls_ArchitectureArea)
L2Process.SetNameAndCode Trim(L3SubSubFolder.Name), Trim(L3SubSubFolder.Code)
L2Process.Stereotype = "Process"
The Architecture Area is created, the Stereotype is assigned:
But the graphical symbol is not the expected one, it"s rather the "default" one ...
What I have configured is:
Is there a way to create Architecture areas and Business Functions, so that the configured Custom Symbols are used? MAybe a parameter for CreateNew like in the CreateModel function, where we can set the Diagram Type?
CreateModel(PdEAM.cls_Model, EvaluateNamedPath("%_MODELS%") + L3SubSubFolder.Name + ".eam" + "|" + "Diagram=CityPlanningDiagram", omf_DontOpenView)
I can't find anything in the documentation in regards to this issue...
Thanks,
RafalHi Rafal,
Could you try creating object directly in the collection using the GetCollectionBySteretype("Process") on model ?
Something like:
Dim processes
Set processes = EamL2.GetCollectionByStereotype("Process")
Set L2Process = processes.CreateNew()
L2Process.SetNameAndCode Trim(L3SubSubFolder.Name), Trim(L3SubSubFolder.Code)
This should assign stereotype at initialization and may be fix your issue...
Marc
PS. I did not check code, take care of potential typo. -
Create Object with "Photoshop.Application"
Cannot create an object reference to Photoshop CC using Excel 2011 and vba, is there missing files with the standard installation?
Hi;
I have been writing VBA code for many years and have always used Windows up till now, I am attempting to do things on a MAC I can easily do in Windows. I have for years used macros written by myself referencing Adobe Photoshop and also Microsoft Access from within Excel. I have used what is termed 'Late binding" to create objects for the above applications. I understand Access is not useable on the MAC but I believe I should be able to use the macros I have written with slight modifications for file locations. Typically nearly the first executable statement in these macros are as follows
Dim appRef as Object
set appRef = CreateObject("Photoshop.Application")
the second statement when executed allows me the opportunity to use Photoshop (Versions 7 -> CS5 have been successful) to reference all the procedures and functions that would appear on the desktop when using Photoshop.
According the scripting PDF manual for CS6 they use the same syntax for the VBScript examples. I believe this should work with Photoshop CC. I think when I installed the cloud version I opted for "Typical" installation" instead of maybe selecting "Custom Installation". How do I achieve the use of the above technique? As stated earlier I have used this since Photoshop 7. Any help would be greatly appreciated.
Thank you,
Robert Firman -
Trying to Learn MVC code first with Vs2013 web express on windows 7 os computer. When code runs to create database get: An exception of type 'System.Data.SqlClient.SqlException' occurred in EntityFramework.dll but was not handled in user code
Additional information: CREATE DATABASE permission denied in database 'master'.
Have this problem with the 'OdeToFood' plurasight course as well with the
'developing ASP.NET MvC 4 Web Applications Jump Start' MVA course.
Re-installed sql2008r2 using window
admin user and ran the project and get same message as when i run the project with the none admin user.
What are steps to allow database creation for admin user and none windows admin user?
Daniel HowardDavid, thanks for the reply.
I believe the problem may be something else because after adding the
user to 'sysadmin' and I still get the message
Additional information: CREATE DATABASE permission denied in database 'master'.
Perhaps I need to go to ASP.NET forum to ask the question.
I will mark you answer as answer.
Thanks again
Daniel
Daniel Howard -
Adding user-created objects to an Array
I would be grateful if anyone can help me. I have created the following class:
import java.util.*;
* Created on 08-Dec-2005
* @author Hussein Patwa
public class room {
public String roomName;
// String to hold the room name
public static void main(String[] args) {
String roomName;
// Temp string to hold room name
LinkedList objectqueue = new LinkedList();
// Queue implementation to hold list of objects in room
LinkedList stack = new LinkedList();
// Stack implementation to hold objects held by user
public void enterRoomName(String roomName) {
// Method to allow entering of the room name
this.roomName = roomName;
// Assignment the room name to the roomName field
public void viewRoomName() {
// Method to allow the viewing of the room name
System.out.println("This is the " + roomName + " ");
// Print the room name
}I also have a main class:
import java.util.*;
* Created on 08-Dec-2005
* @author Hussein Patwa
public class start extends room {
public static void main(String[] args) {
String gameName = "PatwaMaze";
// Field to hold the game name
room[] roomList = new room[6];
// Create a new array to hold the rooms
public void startGame() {
roomList.add["Kitchen"];
roomList.add["Parlour"]
roomList.add["Lounge"]
roomList.add["Stairs"]
roomList.add["Chamber"]
roomList.add["Study"]
}I want to create an array of room objects, or would it be more correct to say object references, and then have their labels as the room name, which would be stored in that room's roonName field. So then I can iterate through the list, and print out each room's roomName field thus giving a list of the rooms. So (and I hope this is making sense), I need to add the rooms to the array, set each room's rromName field and then iterate through it. But I'm not sure of the syntax to add the room's name and the array index.
BTW, I have done quite a bit of searching for this, as well as looked through several texts, so I am posting here because i'm not sure where to go next.
Thanks.
Hussein.Short answer: There's no add method. That woul be in a Collection.
http://java.sun.com/docs/books/tutorial/collections/
For an array, it's arr[0] = something;
arr[1] = somethingElse;
/ / etc. -
4.0 EA2 - Insufficient Privileges When Creating Object With Proxy
When I have connected by proxying to another user, I receive the following message when trying to create a new object:
The database user has insufficient privileges for the given operation.
Steps to reproduce:
Connect by proxying to another user
Right Click on Views
Select New View
I noticed this under EA1, though, not sure if reported. This worked under 3.2.2Sounds like your management needs a stern lecture on the concept of change management. <g>
I am not debating what you do. I am questioning the logic, or lack thereof, of doing it that way. My recommendation would be to change your procedure to one that:
A. Is more in line with good change management practices.
B. Works. -
How to use user defined object with linked button
Hi experts
Can I use user defined table data with linked button. If yes then how. plz give me sample examples.
Regards
GorgeIf you have an UDO in your form, or any other, the FormDataLoad eventhandler should be used.
Take care, it is not inside the eventhandler.
for VB:
Select SBO_APPLICATION in the classes, and select FormDataLoad event
Private Sub SBO_Application_FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.FormDataEvent
in C#
Add a new eventhandler as
// declaration
SBO_Application.FormDataEvent += new SAPbouiCOM._IApplicationEvents_FormDataEventEventHandler(ref SBO_Application_FormDataEvent);
// eventhandler:
public void SBO_Application_FormDataEvent(ref SAPbouiCOM.BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent) -
Creating JTree with results from SQL Query
I have the following source in SQLJ:
String temp=null;
iter1 it1;
iter2 it2;
#sql it1={select id,fdn,level from groups connect by prior fdn=parent_fdn start with fdn='/' };
while(it1.next())
System.out.println(it1.id()); // Display Parent
temp=it1.fdn();
#sql it2= {select clli from nes where parent_fdn=:temp order by clli };
while(it2.next())
System.out.println(it2.clli());//Display Child of above Parent if any
My problem is to construct a Tree GUI using JTree from the above
code with the same hierarchy of parent-child relationship.
I have tried every possible solution using Vectors,Hashtables,String Arrays etc but have not come up with a successful solution so far
IF ANYONE HAS A SOLUTION PLEASE HELP ME WITH AN EXAMPLE.
Thank You
Sharathsharathkv,
Your issue seems to be in figuring out an algorithm to convert row-based SQL resultsets to a hierarchical data structure suitable for display in a tree.
Run the jython (www.jython.org) app below: it simulates doing just that. jython is indentation-sensitive, so you'll need to exercise care when copying. If copy-paste to a text editor doesn't work, copy-paste to a HTML-aware editor (even Outlook Express, if on Windows), then copy from there and paste in a text editor.
--A
This is a jython (www.jython.org) app that illustrates
converting row-based data (eg. a SQL resultset) to a custom
hierarchical data structure, and displaying it in a JTree.
from javax.swing import *
from javax.swing.tree import *
import java
def getSQLRows():
Simulates a SQL resultset.
Columns fdn and parent-fdn indicate parent/child relationships.
rows = [
# id, fdn, parent-fdn, level
[1, '/', None, 1]
, [2, '/fruits', '/', 2]
, [3, '/colors', '/', 2]
, [4, '/sports', '/', 2]
, [5, '/fruits/apples', '/fruits', 3]
, [6, '/fruits/oranges', '/fruits', 3]
, [7, '/colors/red', '/colors', 3]
, [8, '/colors/blue', '/colors', 3]
, [9, '/sports/petanc', '/sports', 3]
, [10, '/sports/rugby', '/sports', 3]
return rows
def convertRowsToHierarchy(rows):
Converts row-based results to hierarchical structure.
Uses known parent/child relations present in rows.
root = None
for row in rows:
fdn, parentfdn = row[1], row[2]
node = SQLTreeNode(fdn, parentfdn)
if root:
root.addEx(node)
else:
root = node
return root
class SQLTreeNode(java.lang.Object):
'''Custom tree node; displayed in JTree'''
def __init__(self, fdn, parentfdn):
self.fdn = fdn
self.parentfdn = parentfdn
self.nodes = []
def add(self, node):
'''Adds node as immediate child'''
self.nodes.append(node)
def addEx(self, node):
'''Adds-with-search. NOTE: naive implementation'''
if self.fdn == node.parentfdn:
self.add(node)
else:
for child in self.nodes:
child.addEx(node)
def toString(self):
return self.fdn
def dump(self):
'''Debug routine to dump hierarchy'''
print 'fdn=%s, parentfdn=%s' % (self.fdn, self.parentfdn)
for node in self.nodes:
node.dump()
class SQLTreeModelAdapter(TreeModel):
'''Tree model adapter: adapts custom data structure to TreeModel'''
def __init__(self, root):
self.__root = root
def getChild(self, parent, index):
return parent.nodes[index]
def getChildCount(self, parent) :
return len(parent.nodes)
def getIndexOfChild(self, parent, child):
return parent.nodes.index(child)
def getRoot(self) :
return self.__root
def isLeaf(self, node):
return len(node.nodes) == 0
def addTreeModelListener(self, l):
pass
def removeTreeModelListener(self, l):
pass
def valueForPathChanged(self, path, newValue):
pass
class SQLTreeDemo(JFrame):
Tree demo UI
Displays a tree displaying [hierarchical] results
of a BOM-type SQL query
def __init__(self):
# Get matrix simulating SQL resultset
rows = getSQLRows()
# Convert to custom hierarchical data structure
root = convertRowsToHierarchy(rows)
model = SQLTreeModelAdapter(root)
tree = JTree(model)
sp = JScrollPane(tree)
self.contentPane.add(sp)
self.size = 200, 300
if __name__ == '__main__':
s = SQLTreeDemo()
s.visible = 1
Maybe you are looking for
-
Is there any report in SAP which gives vendor payment report by cost center or internal order. Thanks.
-
Could not complete your request the file is not compatible with this version of Photoshop.
User has been working on a photoshop document for a whole day, when they came to open it the next day the were presented with the error message could not complete your request the file is not compatible with this version of Photoshop. The file has be
-
Touch-pad "click" not working after waking-up from
Hi, I hope the subject is kind of a give away. Basically, I've finally gotten around to sorting out ACPI for my Dell 9600 laptop. I've configured, via KLaptop, for the machine to go into Standby when I close the lid. This works ok except that when I
-
Digital stopwatch circuit not working/running smoothly
I made the following Digital stopwatch circuit using IC 7490, 7448 and cathode seven segment display on multisim and the transition between 2 and 3 and some other states isnt smooth or is getting stuck. What modifications can be done to run this ci
-
Dear Experts, I am again in trouble. This time it is with commitment check, I have created a project, and created a PR for material and Services, here my problem is commitment check for material is not taking place, where as the same is triggering fo