How to get fixed results using JPA
Hi
I have a table with lot of rows, when I querry, it is taking a lot of time and I am displaying that many rows in UI in single table. So it is not scaling well.
SO I am planing to show x number of row in on page. So for that to achieve, how do I querry the db (derby) using JPA to get first 25 rows, next 25 rows...
I appricate any help
thanks
i think you can have a serial number column in your table and you keep track of that serial number. I mean pass it to your method along with the size of page. Lets say if the number starts from 0 then you can calculate the first page using starting number + page size, if your page size is 25 then you will get 0+25 =25 and you can use the result to query from database like;
select * from myTable where rowNo<=25
You can store this number (Now 25) in user's session and pass it to the method.
Similar Messages
-
How to get sequence result using httpservice
I send 2 httpservice requests to server: requestA and
requestB in sequence, but sometime I get the response of responseB
first. How can I get the sequence result, response from A and then
response from B.use AsyncToken - assign it to your HTTPService like so....
var tok:AsyncToken = myservice.send(params)
tok.requestName = "myRequest"
Then in your resultHandler test for the token
if(event.token['requestName']=='myRequest'){
do something with the event.result
} -
How to get multiple records using fn-bea:execute-sql()
Hi,
I created Proxy service(ALSB3.0) to get records from DB table. I have used Xquery function(fn-bea:execute-sql()). Using simple SQL query I got single record, but my table having multiple records. Please suggest how to get multiple records using fn-bea:execute-sql() and how to assign them in ALSB variable.
Regards,
Nagaraju
Edited by: user10373980 on Sep 29, 2008 6:11 AMHi,
Am facing the same issue stated above that I couldnt get all the records in the table that am querying in the Proxyservice.
For example:
fn-bea:execute-sql('EsbDataSource', 'student', 'select Name from StudentList' ) is the query that am using to fetch the records from the table called StudentList which contains more than one records like
Id Name
01 XXX
02 YYY
03 ZZZ
I tried to assign the result of the above query in a variable and while trying to log the variable, I can see the below
<student>
<Name>XXX</Name>
</student>
I want to have all the records from my table in xml format but it's not coming up. I get the value only from the first row of my table.
Please suggest.
regards,
Venkat -
Call function in background task... How to get the result?
I want to use Call function in background task parameter.
But I cannot find the result of this function. (No export parameter, no table result, no exception)
How to get the result of this function module? Correct or not?Hi Heinz,
You can check the result in SM58 transaction.
For more information pls. refer this thread :
No IMPORTING parameters allowed in CALL FUNCTION IN BACKGROUND TASK
Best regards,
Prashant -
How to get this output using sql query?
Hi,
How to get this output using sql query?
Sno Name Age ADD Result
1 Anil 23 delhi Pass
2 Shruti 25 bangalor Pass
3 Arun 21 delhi fail
4 Sonu 23 pune Pass
5 Roji 26 hydrabad fail
6 Anil 28 delhi pass
Output
Sno Name Age ADD Result
1 Anil 23 delhi pass
28 delhi passHi Vamshi,
Your query is not pretty clear.
write the select query using Name = 'ANIL' in where condition and display the ouput using Control-break statements.
Regards,
Kannan -
Af:query - How to get the result rowsets
Hi,
I have a requirement where i need to search the db rows on and append the results the adf rich table on each search.
For this i am using af:query component. And trying to get the result rows for the named criteria.
String mexpr = "#{bindings.DestinDescVOCriteriaQuery.processQuery}";
processMethodExpression(mexpr, queryEvent, QueryEvent.class);
ViewCriteriaManager vcm = getDestinDescViewObj().getViewCriteriaManager();
ViewCriteria vc = vcm.getViewCriteria("DestinDescVOCriteria");
getDestinDescViewObj().applyViewCriteria(vc);
AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
adfFacesContext.addPartialTarget(tblDestinDesc);
However on each click of search the rows searched in the previous attempt are not retained.
Can anyone let me know how to get the result from named criteria and append it the table?
Thanks
AjayCan anyone help?
-
How to get the results for given Bind Variable
Hi
Can any one help me how to get the result rows from the View Object after executing the view object query by setting bind variable?
snippet as follows
viewObject.setNamedWherClauseParams("name","hei");
viewObject.executeQuery();
How to get the results from viewObject is my question..?
Thanks in advanceShould be something like
while (vo.hasNext()){
Row r = vo.next();
r.getAttribute....
You might want to read the "most commonly used methods" appendix in the ADF Developer Guide. -
How to get SharePoint Groups using Javascript in SP2013 ?
How to get SharePoint Groups using Javascript in SP2013 , not JSOM please
Here is the code that worked for me:
<script type="text/javascript">
var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups";
var requestHeaders = { "accept" : "application/json;odata=verbose" };
$.ajax({
url : requestUri,
contentType : "application/json;odata=verbose",
headers : requestHeaders,
success : onSuccess,
error : onError
function onSuccess(data, request){
var s='';
for (var i = 0; i < data.d.results.length; i++)
s +=data.d.results[i].LoginName+'\n';
alert(s);
function onError(error) {
alert("error");
</script> -
How to get iccid by using imei?i had lost my iphone and i want to find it back.
how to get iccid by using imei?i had lost my iphone and i want to find it back.
Ocean20 wrote:
Not sure about ICCID but you can get your IMEI by going to the computer you normally sync to and open iTunes there click on edit then preferences then on the devices tab and then hover mouse over your backup and the IMEI and other info on your phone will appear
Interesting. Yet another of the many Easter eggs dispersed throughout the system. -
How to get the workcentres used in the routing out of 2 alternate routings
Dear All,
I would like to know how to get the workcentres used in the routing out of 2 alternate routings.
I referred PLKO got the Task List Type (PLNTY), Group(PLNNR), Group Counter(PLNAL), Plant(werks).
I passed this in to PLPO, The problem in PLPO is we dont have the distinguishing field Group Counter(PLNAL), so I am getting all the ARBID including both alternates.
How to get the ARBID with respect to Groupcounter 1 alone.
If a get the ARBID , I can get the ARBPL from CRHD.HI,
Use PLAS Table also. you have to use PLKO> PLAS> PLPO.
Pass PLNNR & PLNAL in PLAS and get PLNNR & PLNKN.
Then pass these into PLPO.
work centers from CRHD
Regards,
Krishna Mohan
Edited by: Krishna Mohan N on Jan 31, 2008 12:28 PM -
How to get query result in comma dilimited text or excel file?
Does anybody know how to get query results in comma delimited
text file or excel file, I tried spool abc.txt, but the result
showed some ------ lines
ThanksTry doing this in your sql scripts
set heading off
set pagesize 0
set linesize 4000
set feedback off
set verify off
set trimespace on
set colsep ","
spool output.txt
select * from dual (or whatever you are querying
spool off
There may be a couple other set statement that you could add but
this should get you started in the right direction -
How to get last column used in report sorting?
hi,
how to get last column used in report sorting?
simonHow to identifiy which column was sorted having different reports on page?
just use:
'YOUR_STATIC_REGION_NAME' instead of p_static_id,
:APP_ID for p_app_id,
:APP_PAGE_ID for p_page_id
:APP_USER_ID for p_app_user.
and dont forget to grant SELECT on #OWNER# to APEX_030200.WWV_FLOW_PREFERENCES$
good luck and thank you Juergen.Schuster
Simon -
how can i do with labview program,when i have 20 different values,and 1 want to add it with constant value.and how to get the results?
Why do the 20 values have to be different? The same code should work even if some are equal.
What do you mean by "get the result"? The result is available at the output terminal and all you need is a wire to get it where you need it. That could be an indicator, another operation, or even a hardware device.
What is the data type of the 20 values? An array? A cluster? A bunch of scalars? A waveform? Dynamic data?
LabVIEW Champion . Do more with less code and in less time . -
How to get Listener Information using PL/SQL code
How to get Listener Information using PL/SQL code
user2075318 wrote:
How to get Listener Information using PL/SQL codeThis approach (somewhat of a hack) can be used - but it does not really provide meaningful data at application layer.
SQL> create or replace function TnsPing( ipAddress varchar2, port number default 1521 ) return varchar2 is
2 type THexArray is table of varchar2(2);
3 --// tnsping packet (should be 10g and 11g listener compatible)
4 TNS_PING_PACKET constant THexArray := new THexArray(
5 '00', '57', '00', '00', '01', '00', '00', '00',
6 '01', '39', '01', '2C', '00', '00', '08', '00',
7 '7F', 'FF', '7F', '08', '00', '00', '01', '00',
8 '00', '1D', '00', '3A', '00', '00', '00', '00',
9 '00', '00', '00', '00', '00', '00', '00', '00',
10 '00', '00', '00', '00', '00', '00', '00', '00',
11 '00', '00', '00', '00', '00', '00', '00', '00',
12 '00', '00', '28', '43', '4F', '4E', '4E', '45',
13 '43', '54', '5F', '44', '41', '54', '41', '3D',
14 '28', '43', '4F', '4D', '4D', '41', '4E', '44',
15 '3D', '70', '69', '6E', '67', '29', '29'
16 );
17
18 socket UTL_TCP.connection;
19 txBytes number;
20 rxBytes number;
21 rawBuf raw(1024);
22 resp varchar2(1024);
23 begin
24 socket := UTL_TCP.open_connection(
25 remote_host => ipAddress,
26 remote_port => port,
27 tx_timeout => 10
28 );
29
30 --// convert hex array into a raw buffer
31 for i in 1..TNS_PING_PACKET.Count loop
32 rawBuf := rawBuf || HexToRaw( TNS_PING_PACKET(i) );
33 end loop;
34
35 --// send packet
36 txBytes := UTL_TCP.write_raw( socket, rawBuf, TNS_PING_PACKET.Count );
37
38 --// read response
39 rxBytes := UTL_TCP.read_raw( socket, rawBuf, 1024 );
40
41 UTL_TCP.close_connection( socket );
42
43 --// convert response to varchar2
44 resp := UTL_RAW.Cast_To_Varchar2( rawBuf );
45
46 --// strip the header from the response and return the text only
47 return( substr(resp,13) );
48 end;
49 /
Function created.
SQL>
SQL> select tnsping( '10.251.93.30' ) as TNSPING from dual;
TNSPING
(DESCRIPTION=(TMP=)(VSNNUM=169869568)(ERR=0)(ALIAS=LISTENER))
SQL> select tnsping( '10.251.95.69' ) as TNSPING from dual;
TNSPING
(DESCRIPTION=(TMP=)(VSNNUM=0)(ERR=0)(ALIAS=LISTENER))
SQL> -
How to get the results in one line
Hi
if i use the script below i get the name of path and then : and in next line i get the results.is there a way to get the results from every path after the : and not in the next line?
another question - is there a way that the script will not show the server name on every path?
(Get-Counter -ListSet LogicalDisk).PathsWithInstances | Get-Counter
THCIf you take you script and pipe it to get member, it will give you a list of various script properties.
(Get-Counter -ListSet LogicalDisk).PathsWithInstances | Get-Counter | get-member
You will see that the object type returned by "Get-Counter" is Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSampleSet.
TypeName:
Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSampleSet
Name MemberType Definition
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
CounterSamples Property Microsoft.PowerShell.Commands.GetCounter.Perfo...
Timestamp Property datetime Timestamp {get;set;}
Readings ScriptProperty System.Object Readings {get=$strPaths = ""...
You can try grabbing different properties, and they will print out differently, displaying the data on the same line in some cases. For example, pipe your output to a "foreach-object" block, and then for each object print out the CounterSamples property.
(Get-Counter -ListSet LogicalDisk).PathsWithInstances | Get-Counter | foreach-object { ($_).CounterSamples }
This should all print on one line now. However, you also asked if there was a way to not have the server print out on every line. The way to control the format of these outputs is to use the "format-table" cmdlet. So you would pipe your output to format-table
and then give it various options. This is how you would pipe it (without any options).
(Get-Counter -ListSet LogicalDisk).PathsWithInstances |
Get-Counter | object { ($_).CounterSamples | format-table }#OR USE YOUR ORIGINAL CODE(Get-Counter -ListSet LogicalDisk).PathsWithInstances |
Get-Counter | format-table }
Now, it's up to you to give format-table the options you want. With no options, output will look unchanged. To see what options are available to you, use get-help.
get-help format-table
I hope this helps!
Thank for all the info...
Maybe you are looking for
-
Text appearance in adobe acrobat (pro) files displays inconsistently unless you zoom in. Mainly 'i's and 'l's look bigger than they should. The pdfs print fine though.
-
Can't get photos out of the trash?
I just tried using iPhoto Diet on my library (around 10,000 photos & 9GB). It moved a bunch of photos into the Trash that, it turns out, aren't duplicates. So, I want to take them out of the Trash and put them in my main library. The trouble is, I ca
-
Type not displaying correctly when publishing
I have a Flash MX file which I created a couple of years ago. I edited it (in MX) and when I published the .swf, the type only displayed every other letter or so. Any one know what the problem is and how to fix it. The type face was Avante Garde Ital
-
Top level navigation to be re organized to come in one page
Dear SDN, I have one requirement. I want to change the Portal Theme in such a way that Top level navigation to be re organized to come in one page istead of scrolling left or right. Suppose the user having more than 20 roles then he shouldnt be scrol
-
Missing and partially-missing elements when printing PDF's -- Problems began 3 days ago
Source files and PDF's created from them are printing fine from Ai and PS, but the same Ai- and Ps-created PDF's opened in Acrobat Pro or preview app are not. Elements are missing, some completely, some partially; half a word or half an image missin