Suryanarayana Murthy Maganti

Greenhorn
+ Follow
since Apr 09, 2012
Suryanarayana Murthy likes ...
Hibernate Eclipse IDE Oracle
Merit badge: grant badges
Biography
I am Maganti Suryanarayana Working as an senior software Engineer from Hyderabad, India.
For More
Hyderabad, India
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Suryanarayana Murthy Maganti

Hi Mark,

Understanding the basics is really very important. When you prepare for any topic collect important points and practice programs and upload to your private github repository. You can review them daily so that you wont forget the basic concepts. Before giving a try i suggest you to practice more and understand concepts in depth. All the best

Thanks,

Maganti Suryanarayana Murthy

Mike Savvy wrote:Hi there!
. . .
Thank you for advices!

Hi Swapna,

The following is the code which is self explanatory in regard to api:




Swapna latha wrote:
Thank you very much Ankit. I do have one more doubt, i am confused about api aslo before and after for compose and andThen method. But your way of explanation is vrey good.

Ankit Garg wrote:The order is quite simple, when you use compose, the inner function is called first, then the outer function is called with the result of the inner function.
Let's create two methods which we'll call with and without Lambda:
EDIT - modifying the example to change return type
Now lets call them without Lambda
This code calls the intToStr function with an Integer value, the resulting String is passed to the strToLong function which converts the String value to Long. In simple terms, with Lambda this can be achieved in two ways (below lines are not code but just explaining the API)
strToLong.compose(intToStr)
OR
intToStr.andThen(strToLong)

[Edit]
Another important point is the resulting function that you get when you call compose. In the above case, after calling compose (or andThen but with reverse parameters), you get a function which takes an Integer as parameter and returns a Long. The way it happens is, first intToStr is called which takes the integer and converts it into a String, then strToLong is called and it converts the String to Long. So it would work something like this
intToLong = strToLong.compose(intToStr);
Integer i = 20;
Long l = intToLong(i)

Ankit,

Best way to prepare for certification is to practice programs and commit them to your private or public repo in github or bitbucket. That way you can have all programs practised at one place and you can refer to them at any point of time.

Thanks & Regards,

Suryanarayana Murthy Maganti.

Namith Kumar wrote:Thanks Vivz Sharma. Great point about summarizing a chapter.

Vivz Sharma wrote:Namith, I still go old school way of writing down the key points into a book chapter wise of course and at the end you have a summary from the book to check whether you missed out on any point or no. One important thing I want to say is for some it many be easy point to memorize and for you it is not then try to challenge yourself that you haven't forgotten any key points from previous chapters.
Happy Learning

Campbell Ritchie wrote:Does that mean you sent that information to Oracle/PearsonVue?



Hi Campbell, the issue is resolved by Oracle team.

Thanks & Regards,

Surya Maganti.

Mikalai Zaikin wrote:Hi Surya,

Out of curiosity, did you manage to apply the promo code ?

Thanks,
MZ


Hi Zaikin,

I got the issue resolved from Oracle team. They have sent me the voucher code.

Thanks & Regards,

Surya Maganti.
Hi All,

I purchased OCP cerification voucher from oracle.com and i have the order id. How should i use it in PearsonVue.

Thanks & Regards,

Surya
Hi All,

I am trying to get 50% off on Certification but always the payment section is having an issue from Oracle site. Is  there any option other than oracle site to pay like Pearson. The issue is observed whenever credit card details are entered and clicked on Pay button.

Please find the attachment. I tried three times on different days but all the times the issue is the same. I reached to oracle.com customer care but havenot got proper response, like they are asking me to reapply it. Is there anyone facing this issue ? Any other alternatives please.

Thanks & Regards,

Surya
I can able to return the collection of messages in the service class. But the problem is that i want to set those messages to Object as it should be passed to VO.

11 years ago
Hi, I am using drools i.e., a fire engine. Instead of writing the business logic in java i am using text based rules. Everything is fine but i have doubt how to assign the error messages or warning messages to the corresponding object which i am inserting in session. I want to set the error messages to the pojo class so that in UI i can display it. Please find the code below.

Message.java



DefaultMessage.java



ValidationReport.java



DefaultValidationReport.java



ReportFactory.java



DefaultReportFactory.java



SecurityRules.drl File


ServiceImplementation class. The problem is here. I am not understanding how to set error messages to UserLogin Pojo class. I have written one logic please correct me. I think what i have written is not setting the error messages to pojo class.




the code is working fine. I am getting the errors also and i am uning the condition that if the size of errors > 0 dont call save or update method. Upto here no problem. The problem is how to set the error message to pojo class so that in UI i can display it.
11 years ago
Thanks Jeff. I will try first and if turns out wrong, i will seek your help.

11 years ago
Hi, I have one list as List<Message> messages=new ArrayList<Message>, where Message is a class which has four properties like, string msg, string shortlist, integer severtity, string errormsg

Message
{
String msg;
Stirng shortlist;
integer severity;
String errormsg;}

One more class is Messages. java

Where i have declared List<Message> messages=new ArrayList<Message>.

For this getter and setters are written

I have a method in Messages.java as

addList(String msg, String shortlist, integer severity, String errormsg)
{
Message m=new Message(String msg, String shortlist, integer severity, String errormsg)
{
this.msg=msg;
this.shortlist=shortlist;
this.severity=severity;
this.errormsg=errormsg;
}
messages.add(m);
}

One more method called as
getSeverity()
{
int severity;

// How to get max value from messages list ?. I am not getting solution here. List<Message> messages contains 3 numbers as severity i.e, assume 3, 5, 4. I have to use for each or iterator and find the max value ? How its done ?

return severity;
}

My question is how to get all the severities in the getSevertiy() from messages (which is a list) and find the max value ?


11 years ago


Why i am getting output for s2 as "with generics" instead of object. What i assume is that return type of get is Object without generics and so we have assigned Object s2=stringList1.get(1) but why i am getting "with generics" whereas i have to get an object as value in System.out.println(s2);
11 years ago
Thanks Jesper.
11 years ago
Hi, I had one doubt regarding the block which is there in the code. When i remove the block i am getting errors. Why the blocks are used here? I am having doubt regarding it. The block is { states.add("VA"P) ........}
11 years ago
Ya What john told is right. What you told is also right as you can use try-catch method or throws clause. Any questions or suggestions or improvements are always welcome
11 years ago