Thursday, October 22, 2015

boost your smartphone or tablet's battery life

Boost your smartphone or tablet's battery life

Protect your Phone's Battery From Overcharging.

Keep your phone battery Healthy.

How to take care for my Phone's Battery? 

Battery Alarm, Battery alarm at any Level., Battery Doctor, Battery full alarm, Battery Health protector, Battery Information, Battery protector,
Battery Peotector

Battery Alarm, Battery alarm at any Level., Battery Doctor, Battery full alarm, Battery Health protector, Battery Information, Battery protector,
Battery Alarm, Battery alarm at any Level., Battery Doctor, Battery full alarm, Battery Health protector, Battery Information, Battery protector, 



Why Battery Full Alarm (Battery Protector & Battery Alarm) is a MUST-HAVE app?
★ Protect Over Charging
Instantly play the alarm tone when charging is Full. You can set Alarm at your choice battery level;
Shows Graphical Battery Level with Percentage.


★ Battery Alarms
App has features to play alarm in Silent, Vibrate mode.
Also it has a Speech Alarm unique feature.


★ Battery Complete Information
It provides all Information related to Battery Health and Battery Temperature


★ Battery Plug (IN/OUT) Sound and Plug Types
There are sounds for Plug in and Plug Out. So you will come to know about whether your phone is actually charging or not.
Graphical Images shows your the Plug Types.


★ App Automatically Start ON/OFF
Configurable auto start feature.


★ Battery Fast Charging
Provides settings for Fast Charging.


★ Battery Saver Modes
There are difference modes available which will help you to save your battery power and will keep the battery health better.


★ Battery Percentage in Notification Area
Battery Full Alarm provides the Current battery percentage into notification area. Also on the lock screen it shows the Battery Information.


Display charge status in real time, accurately shows the battery percentage.

Battery Full Alarm & Battery Monitor or Battery Alarm is the simplest and easiest way to keep your Android phone Battery Health Better and Protect It from Overcharging.

Wednesday, October 21, 2015

STRUTS 2 ATCHITECTURE


ECLIPSE SHORTCUTS

Eclipse Shortcuts

CTRL SHIFT R Open a resource
CTRL E Open a file (editor) from within the list of all open files
CTRL PAGE UP or PAGE DOWN Navigate to previous or next file from within the list of all open files
ALT <- or ALT -> Go to previous or next edit positions from editor history list
Java Editing
CTRL SPACE Type assist
CTRL SHIFT F Format code
CTRL O List all methods of the class
CTRL SHIFT O Organize imports
CTRL SHIFT U Find reference in file
CTRL / Comment a line
F3 Go to the declaration of the variable
F4 Show type hierarchy of on a class
CTRL T Show inheritance tree of current token
SHIFT F2 Show Javadoc for current element
ALT SHIFT Z Enclose block in try-catch
General Editing
F12 Focus on current editor
CTRL L Go to line number
CTRL D Delete a line
CTRL <- or -> Move one element left or right
CTRL M Maximize editor
CTRL SHIFT P Go to the matching parenthesis
Debug, Run
CTRL . or , Navigate to next or previous error
F5 Step into
F6 Step over
F8 Resume
CTRL Q Inspect
CTRL F11 Run last run program
CTRL 1 Quick fix code
Search
CTRL SHIFT G Search for current cursor positioned word reference in workspace
CTRL H Java search in workspace

Hibernate annotations Introduction

Friends Happy point for you:- Annotations are replacement for “xyz.hbm.xml” files

Let us learn few points regarding annotations in hibernate

Annotations are introduced in java along with JDK 1.5, annotations are used to
provide META data to the classes, variables, and methods of java

Annotations are given by SUN as replacement to the use of xml files in java

In hibernate annotations are given to replace hibernate mapping [ xml ] files

While working with annotations in hibernate, we do not require any mapping files, but
hibernate xml configuration file is must required

Hibernate borrowed annotations from java persistence API but hibernate it self doesn’t
contain its own annotations

Every annotation is internally an Interface, and the keywords starts with @ symbol

Hibernate Transient + Persistent + Detached Objects

Transient Object :
One newly created object of POJO class without having any relation with the database, means
never persistent, not associated with any Session object.

Persistent Object:
An object of a POJO class having relation with the database, associated with a unique Session
object

Detached Object:
An object of a POJO class Previously having relation with the database [persistent ], now not
associated with any Session object

Hibernate Object's Transient & Persistent states


Whenever an object of a POJO class is created then it will be in the Transient state
An object in a Transient state doesn’t represent any row of the database,

Means it is not associated with any Session object, No relation with the database, it is just a
normal object

 If we modify the data of a POJO class object, when it is in transient state then it doesn’t effect
on the database table

When the object is in persistent state, then it represent one row of the database,

In persistent state object is having associated with the unique Session

If we want to move an object from persistent to detached state, then we need to do either
close that session or need to clear the cache of the session

If we want to move an object from persistent state into transient state then we need to delete
that object permanently from the database

Tuesday, October 20, 2015

Criteria Query + Conditions To Criteria + criterion

Criteria Query is only for selecting the data from the database

Using Criteria query we can select complete objects only not partial objects

In fact by combining criteria and projections concept we can select partial objects too

We cannot perform non-select operations using this criteria.

Criteria is suitable for executing dynamic queries too,

Friend lets take a flight of how to use this criteria queries in the hibernate
Syntax:
Criteria criteria = session.createCriteria(“Class Name”.class);
How to use ?
Criteria criteria = session.createCriteria(Entity.class);
List list = criteria.list()
Iterator iterator = list.iterator();
while(iterator.hasNext())
{
Object obj = iterator.next();
Entity entity = (Entity)obj;
/*------ Further code ----- */
}

Adding Conditions To Criteria
If we want to put conditions to load data from database, using criteria then we need to create
one Criterion Interface object and we need to add this object to Criteria Class object

Criterion is an interface given in “org.hibernate.criterion” package

In order to get Criterion object, we need to use Restrictions class

Restrictions is the factory for producing Criterion objects, but friends there is no explicit
relation between Criterion interface and Restrictions class, it means Restrictions class is not
implemented from Criterion Interface

Restrictions class, we have all static methods and each method of this class returns
Criterion object

Restrictions class is also given in “org.hibernate.criterion” package

How to use criterion ?
Criteria criteria = session.createCriteria(Entity.class);
Criterion criterion =Restrictions.gt("id", new Integer(11));
// .gt() : means greater than
// id is a variable of our POJO class Entity.java
criteria.add(criterion); // adding criterion object to criteria class object
List l = criteria.list(); // executing criteria query
In our above example we are fetching the data by comparing id greater than (>) 11
If we want to put more conditions on the data (multiple conditions) then we can use
.and() method ,. or() method , .eq() method using the Restrictions class
How to use Restrictions?
Criteria criteria = session.createCriteria(Entity.class);
criteria.add(Restrictions.and(Restrictions.like("name","%M%"),Restrictions.eq("category",ne
w String(“bird”))));
List list = criteria.list();
Iterator it = list.iterator();
Buddy, like this we can add required number of conditions

Conditions to Criteria
If we want to add some sorting order for the objects, before the objects are going to store
in list object then we need to add an Order class object to the Criteria class object by
calling addOrder() method

Order is a class given in “org.hibernate.Criterion” package

In Order class, we have 2 static methods, asc()[ascending order] and dsc()[descending
order] for getting an objects in required order

Internal concept is, hibernate will select the records (rows) from ENTITIES_DATA table
and stores them into a ResultSet and then converts each row data of resultset into a POJO
class object basing on our field type, then add all these objects into a list according to the
order we have given

Scrum and Scrum master

Scrum  Scrum is a framework which helps a team to work together.  It is like a rugby team (the scrum name comes from rugby game). Scrum enco...