Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
System.out.println(array);
context.MaxDate=String.valueOf(array.pollLast());
System.out.println("context.MaxDate is: "+context.MaxDate);
Starting job FindMostRecentFile at 12:01 24/06/2008.
context.MaxDate is: 1213754467354
Job FindMostRecentFile ended at 12:01 24/06/2008.
System.out.println(array);
context.MaxDate=Long.toString(array.pollLast());
System.out.println("context.MaxDate is: "+context.MaxDate);
what I need to do is get the file name of the file with that max date value.
context.setProperty("maxDate", array.pollLast());
what I need to do is get the file name of the file with that max date value.
Define a context variable: maxDate (data type: long), type in the code below on tJavaFlexcontext.setProperty("maxDate", array.pollLast());
then, iterate all the files again and use this context do a inner join.
Starting job FindMostRecentFile at 11:22 23/06/2008.
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method setProperty(String, String) in the type Properties is not applicable for the arguments (String, Long)
at sqlbasedproperties.findmostrecentfile_0_1.FindMostRecentFile.tFileList_1Process(FindMostRecentFile.java:1106)
at sqlbasedproperties.findmostrecentfile_0_1.FindMostRecentFile.runJobInTOS(FindMostRecentFile.java:1242)
at sqlbasedproperties.findmostrecentfile_0_1.FindMostRecentFile.main(FindMostRecentFile.java:1140)
Job FindMostRecentFile ended at 11:22 23/06/2008.
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method setProperty(String, String) in the type Properties is not applicable for the arguments (String, Long)
context.setProperty("maxDate", String.valueOf(array.pollLast()));
long s=Long.parseLong(context.getProperty("maxDae"));
Hello
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method setProperty(String, String) in the type Properties is not applicable for the arguments (String, Long)
trycontext.setProperty("MaxDate",String.valueOf(array.pollLast()));
System.out.println(array);
System.out.println("The max date is: "+array.pollLast());
context.setProperty("MaxDate",String.valueOf(array.pollLast()));
System.out.println("context.MaxDate is: "+context.MaxDate);
Starting job FindMostRecentFile at 11:47 24/06/2008.
The max date is: 1213754467354
context.MaxDate is:
Job FindMostRecentFile ended at 11:47 24/06/2008.
Starting job FindMostRecentFile at 11:45 24/06/2008.
The max date is: 1213754467354
context.MaxDate is: null
Job FindMostRecentFile ended at 11:45 24/06/2008.
System.out.println(array);
System.out.println("array.pollLast()is: "+array.pollLast());
context.setProperty("MaxDate",Long.toString(array.pollLast()));
System.out.println("Long.toString(array.pollLast()) is: "+Long.toString(array.pollLast()));
System.out.println("context.MaxDate is: "+context.MaxDate);
context.setProperty("MaxDate2",String.valueOf(array.pollLast()));
System.out.println("String.valueOf(array.pollLast()) is:"+String.valueOf(array.pollLast()));
System.out.println("context.MaxDate2 is: "+context.MaxDate2);
Starting job FindMostRecentFile at 11:57 24/06/2008.
array.pollLast()is: 1213754467354
Long.toString(array.pollLast()) is: 1210730892193
context.MaxDate is:
String.valueOf(array.pollLast()) is:1210385310021
context.MaxDate2 is:
Job FindMostRecentFile ended at 11:57 24/06/2008.
System.out.println(array);
context.MaxDate=String.valueOf(array.pollLast());
System.out.println("context.MaxDate is: "+context.MaxDate);
Starting job FindMostRecentFile at 12:01 24/06/2008.
context.MaxDate is: 1213754467354
Job FindMostRecentFile ended at 12:01 24/06/2008.
System.out.println(array);
context.MaxDate=Long.toString(array.pollLast());
System.out.println("context.MaxDate is: "+context.MaxDate);