Posts

Showing posts from 2017

Java Interview Questions - ADP

How to implement composite primary keys in Hibernate? If the database table has more than one column as primary key then we call it as  composite primary key , so if the table has multiple primary key columns , in order to configure these primary key columns in the hibernate mapping file we can configure in 3 ways as below. Using @IdClass annotation @Entity @IdClass(ProjectId.class) public class Project { @Id int departmentId; @Id long projectId; : } Class ProjectId { int departmentId; long projectId; } Using embeddable class: @Entity public class Project { @EmbeddedId ProjectId id; : } @Embeddable Class ProjectId { int departmentId; long projectId; } XML configuration: <hibernate-mapping> <class name = "str.Product" table = "products" > <composite-id> <key-property name = "productId" column = "pid"   /> <key-property name = ...

Java Interview Questions- Phenom People

Technical Round - 01: Constructors Overriding main method Code to check palindrome diff approaches Elasticsearch Performance comparison of db and es Graphite Sql injection Cross site scripting  Code to identify repeated characters in a string Java tuple Best problem solved workwise Identify a deadlock in program JMS point to point messages in java Linq Message queues in java How to get records based on some value in  large data Technical Round - 02: Machine learning Elastic search How do you index 10000 text documents Insert query Difference between match and query_string Shards Diff between java 5 6 7 8 Write your arraylist How to make a class immutable Click here for NTT DATA interview questions