|
Looks like your String.valueOf(a.getId()) expression is not generating anything. Use your debugger to see what is happening.
|
|
|
|
|
that expression is working fine, it's the only thing on that line that IS working.
Based on the error I get, it looks like the join isn't working good. But I don't have enough knowledge to fix it.
|
|
|
|
|
I'm afraid that's an SQL issue, nothing to do with Java.
|
|
|
|
|
It's a Hibernate issue which is part of Java, so I think otherwise. But let's ask the question differently:
I want to get a list of type C where the property of type A matches a value of type A.
Or put in practice: I have a combobox filled with a list of type A. Type C has 2 properties: a & b. a is of type A, b is of type B. Now I want a list of type C where property a matches the value of the combobox.
How would you do this with using Hibernate?
|
|
|
|
|
Sorry, I don't know Hibernate.
|
|
|
|
|
Dated: 29th April 2014
To,
The Managing Director
Southtech Limited,
Plot -1, Road -13, Sector -1,
Uttara Model Town, Dhaka 1230
Subject: Resignation Letter for the position of Ascend Programmer.
Dear Sir,
With due respect, I would like to inform you that, I have some problem to continue my job in your organization and have intention to leave my position as Ascend Programmer from your Ascend ISS Department in Southtech Limited.
It was a great honor for me to work with you. Due to family crisis, financial and physical problem, I am unfitted in this job position. Right now, no pending projects are dependent on me. I feel tremendous problem to continue my work. Therefore, I would like to request you to relieve me of my duties immediately. Please be assured that I will do all I can to assist in the smooth transfer of my responsibilities before leaving.
I wish both of you and Southtech Limited, every good fortune and I would like to thank you for having me as a part of your team.
Best regards,
Mostafizur Rahman
Ascend Programmer
Pin: 641
Souttech Limited
Contact: +8801675876752
Email: mostafizur.cse@gmail.com
C.C.:
1. Md Zayed Zulfikar, Chairman, Southtech Limited, Sector -1, Uttara Model Town, Dhaka 1230
2. Md. Shajibul Hussain Talukder, Senior software developer, Ascend ISS, Southtech Limited, Sector -1, Uttara Model Town, Dhaka 1230
3. Human Resource Department, Southtech Limited, Sector -1, Uttara Model Town, Dhaka 1230
how can read all line in java with formating in above message
|
|
|
|
|
Given that we have no idea what formatting you are talking about, it is impossible to answer. Please explain the format used in the file.
|
|
|
|
|
I think you should use BufferedReader/Writer. According what i saw, it looks like simple text.
PS: My English's not good, please ignore my mistake.
|
|
|
|
|
private List<Patienthealthdata> patientHealthDataList = new ArrayList<Patienthealthdata>();
patientHealthDataSet = medicalHistoryService.getLatestMedicalHistoryDataAttributes(patient);
String groupName = patientHealthData.getHealthdata().getHealthdatagrouplinks().iterator().next().getHealthdatagroup().getName().trim();
if (groupName.equals(Constants.HELTH_GROUP_BMI)) {
if (patientHealthData.getHealthdata().getName().contains("Height (ft)")) {
for (Entry<Integer, String> entry : heightMap.entrySet()) {
if (entry.getKey() == 1) {
valHeightFt = entry.getValue();
}
if (entry.getKey() == 2) {
valHeightInch = entry.getValue();
}
int indexInch = valHeightInch.indexOf('\'');
if (indexInch > 0) {
valHeightInch = valHeightInch.substring(0, indexInch);
}
int indexFt = valHeightFt.indexOf('\'');
if (indexFt > 0) {
valHeightFt = valHeightFt.substring(0, indexFt);
}
if (!valHeightFt.equals("") && !valHeightInch.equals("")) {
newValue = valHeightFt + "'" + valHeightInch + "\"";
patientHealthData.setHealthDataValueDisplay(newValue);
}
}
patientHealthDataList.add(patientHealthData);
}
|
|
|
|
|
Not sure what the question is but TreeMap might be the answer since it is a sorted collection.
|
|
|
|
|
Any body can give me java code similar to ASP.net
ISNOTPOSTBACK
so that I can fetch / fill my current page values without refreshing the page and If I filled the half of my form they will not get effected
|
|
|
|
|
Hello,
There are multiple ways
- Using the JSTL tag libraries in plain JSP
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
...
<input id="txtFName" name="txtFName" value="${fn:escapeXml(param.txtFName)}">
...
<textarea id="txtLName" name="txtLname">${fn:escapeXml(param.txtLName)}</textarea> - Using Spring Framework & Spring Form Tag Library
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|
|
I want to display notification (messages/data updates) by other users on the my current loginuser page.
example as soon we get mail, our page will change update new mails without refreshing entire page.
Please help me
|
|
|
|
|
1: procedure AllocateVM(VMList)
2: i←1;
3: while VMList ≠ ɸ do
4: HostId ←RankingAlgo(HostList; Requirmenti; Rank);
5: HostHostId←VMi ;
6: i←i + 1;
7: end while
8: end procedure
1: procedure RankingAlgo (HostList; Requirment; Rank)
2: for each Host € HostList do
3: if Host Satisfies the Requirments then
4: add (MemberList;Host);
5: end if
6: end for
7: PriorityList← SortByRank(MemberList;Rank);
8: AllocatedHost←PriorityList(1);
9: Return AllocatedHost;
10: end procedure
|
|
|
|
|
There is nothing in there that requires anything more than a understanding for the java language (no API needed.)
So the idea is learn basic java and then write the code.
|
|
|
|
|
i want to create a java project:
Create objecte
create two function WriteXml () and ReadXml !
writeXml(): save informayion to xml file
ReadXml(): Read information frm xml file and show!
i use jdom 2.02
i do on 1 file "WriteReadXml.java"
-----code
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.JDOMException;
import org.jdom2.Text;
import org.jdom2.input.SAXBuilder;
import org.jdom2.output.Format;
import org.jdom2.output.XMLOutputter;
public class ReadWriteXml {
public static void main (String[] args){
writeXml ();
}
private static void ReadXml(){
SAXBuilder builder = new SAXBuilder();
Document readDoc = null;
try {
readDoc = builder.build(new File("./src/jdomMade.xml"));
} catch (JDOMException | IOException e) {
e.printStackTrace();
}
System.out.println("Root:" + readDoc.getRootElement());
System.out.println("Show:"+
readDoc.getRootElement().getChild("show").getChildText("name"));
System.out.println("show ID :" + readDoc.getRootElement().getChild("show").getChild("name").getAttributeValue("show_id) + "));
Element root = readDoc.getRootElement();
for (Element curEle : root.getChildren("show"));{
Element curEle = null;
System.out.println("show Name : " +
curEle.getChildText("name"));
System.out.println("show ID : "
+curEle.getChild("name").getAttributeValue("show_id"));
System.out.println(" on " +
curEle.getChildText("network")+"in the");
System.out.println(curEle.getChild("network").getAttributeValue("country"));
}
}
private static void writeXml () {
try{
Document doc = new Document();
Element theRoot = new Element ("tvshows");
doc.setRootElement(theRoot);
Element show = new Element ("show");
Element name = new Element ("name");
name.setAttribute("show_id","shows_001");
name.addContent(new Text ("Game program"));
Element network = new Element ("network");
network.setAttribute("C***ry","TN");
network.addContent(new Text ("TNN"));
show.addContent(name);
show.addContent(network);
theRoot.addContent(show);
Element show2 = new Element ("show");
Element name2 = new Element ("name");
name2.setAttribute("show_id","shows_002");
name2.addContent(new Text ("Kids prgram"));
Element network2 = new Element ("network");
network2.setAttribute("C***ry","FR");
network2.addContent(new Text ("TNT"));
show2.addContent(name2);
show2.addContent(network2);
theRoot.addContent(show2);
XMLOutputter xmlOutput = new XMLOutputter (Format.getPrettyFormat());
xmlOutput.output(doc, new FileOutputStream(new File (".src/jdomMade.xml")));
System.out.println("Wrote to file");
}
catch (Exception ex){
ex.printStackTrace();
}
}
} ----
_________________________
error is :
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at ReadWriteXml.writeXml(ReadWriteXml.java:84)
at ReadWriteXml.main(ReadWriteXml.java:16)
tnx for answer me http://s.codeproject.com/script/Forums/Images/thumbs_up.gif
http://s.codeproject.com/script/Forums/Images/smiley_doh.gif
|
|
|
|
|
Hello,
The problem is in following line
xmlOutput.output(doc, new FileOutputStream(new File (".src/jdomMade.xml")));
Please correct it to
xmlOutput.output(doc, new FileOutputStream(new File ("./src/jdomMade.xml")));
Without this you are probably going to get FileNotFoundException.
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|
|
A jsp project is developed by using Tomcat server.Now I want to install the same project in Jboss server. Can anyone tell me the steps to do????
My database is Microsoft SQL server 2008 R2
|
|
|
|
|
|
Hello Experts,
I have PDF files with tables.
I am required to extract text of the file and identify the tables.
I am using iTextPDF as my PDF parser. I receive the text in tables as strings.
Can someone suggest me a good approach for this?
Please help me.
Thanks
Raesa
|
|
|
|
|
What kind of "approach" are you thinking of?
Sounds like you've got the issue covered.
regards Torsten
I never finish anyth...
|
|
|
|
|
Hello Torsten,
I need to identify tables in PDF.
The text in a page comes like a single string. I am not sure how to go ahead with this.
I have to identify the table header and data in each row and column and i am not sure how to do this.
It would be nice if I could get some advice me on this.
Thanks
Raesa
|
|
|
|
|
Have you tested some? You might be able to identify the table in the stripped text by some special character( or combination).
regards Torsten
I never finish anyth...
|
|
|
|
|
I tried but it simply comes as text string with new line separator.
I am not sure how to go forward on this.
Raesa
|
|
|
|
|
hmm, then you're running into some problem.
PDF have no tables. It's text with some lines drawn around.
Please check if you can figure some additional spaces in the text, e.g. 3 spaces ( " " ) would be the place where a line of the table was placed.
If you cannot find anything like that and work with it, you would have to reject that ticket.
regards Torsten
I never finish anyth...
|
|
|
|