• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/29

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

29 Cards in this Set

  • Front
  • Back

True or False? Hibernate allows you to develop persistent classes following common Java idiom-including association, inheritance, polymorphism, composition, and the Java collections framework.

Ans:


True!

What are the Instance states of persistent classes?

Ans:


Transient - no association of data.


Persistent - association of data.


Detached - no longer associated with data after session close.

What is the purpose of ORM?

Ans:


ORM/Object-Relational Mapping. It is the automated persistence of objects in a Java application to the tables in a relational database.

Is the SessionFactory a thread safe object?

Ans:


Yes!

What is Hibernate exactly?

Ans:
Hibernate is a pure Java object-relational mapping and persistence framework that allows you to map plain old Java objects to relational database tables using XML configuration files.

What are the core interfaces associated with the HIbernate framework?

Ans:


1. Session Interface


2. SessionFactory Interface


3. Configuration Interface


4. Transaction Interface


5. Query & Criteria Interfaces

How may the query cache become enabled? By setting Property name:-....

Ans:


hibernate.cache.use_query_cache true/false

Is Employee object available to access from the following statement?


-Employee emp = session.load(Employee.class);


session.close();

Ans:


No

How can you make a property be read from the database, but not modified in anyway?

Ans:


By using the insert="false" and update="false" attributes

Explain the difference between...


- Emp e = session.load(Emp.class);


- Emp e = session.createCriteria(Emp.class)

Ans:


On session close session.load() Emp object unavailable to access.

If you are not certain that a matching row exists in the database then, which method is the best?

Ans:


Session.get()

Does hibernate require persistent classes to implement Serializable?

Ans:


Not Required

How would one go by getting the Connection object from session?

Ans:


session.connection()

The SessionFactory in hibernate represents which level of cache?

Ans:


2nd Level

What should the Struts framework always should do?

Ans:


Should always decouple the applicaiton from a specific model implementation.

What are the pre-build Action classes in Struts?

Ans: SLLAMDDIF


-Switch Action, Locale Action, LookupDispatch Action, Action, MappingDispatch Action, Download Action, Dispatch Action, Include Action, Forward Action.

In Struts, what should always forwards or redirect to a resource (view) after completed?

Ans:


Request Processor


What is an instance of Action invoke by?

Ans:


Request Processor

Which logic tag is used for repetitive output generation?

Ans:


logic:interate

Application module selection is done by what in Struts?

Ans:


Action Servlet

Action Servlet, Request Processor, and Action classes are the components of what in Struts?

Ans:


Controller

What defines the availability of necessary Struts custom tag libraries in struts-config.xml file?

Ans:


taglib

What are the four performances by the Action Servlet and Request Processor?

Ans:


1. Receiving the HTTPServletRequest


2. Populating JavaBean from the request parameters.


3. Provide extension points.


4. Content type issues handling.

What is an ActionServlet?

Ans:


It is the central component of the Struts Controller.


- It reads/loads the struts-config.xml into memory during the init()


- In the doGet() & doPost() methods, it intercepts HTTP request and handles it appropriately.

What is an ActionForm?

Ans:


Setters/Getters; It contains the data entered from the form (UI) on the client side. a.k.a: Form Bean

What are the various ways of doing form validation?

Ans:


1. JavaScript client-side validation
2. Struts Validator Framework
3. Override the validate method in the Struts form class & use Action Errors.

What are the steps to integrating the Validator Framework with a Struts application?

Ans:


1. Setup plugin in the struts.config.xml.
2. Set the location of MessageResources.properties in <message-resource> of struts config.xml.


3. In <action> under struts.config.xml set the validate=true and input=/.jsp file attributes


4. Extend ValidatorForm in the form class if one is used.


5. Edit the validation.xml to map the properties of the form bean to the definitions in the validator-rules.xml


6. Place the error messages in MessageResources.properties.


7. Place the <html:errors/> in the appropriate JSP set by the input attribute in Step 3.

What is a DynaActionForm?

Ans:


The DynaActionForm allow the developer to create a form on the fly. It uses less memory thus making it faster than an Actual Form being created.

What is DynaValidatorForm?

Ans:


It is a sub-class of DynaActionForm. It allows the DynaActionForm to perform initial validation with the Validation framework.