Subversion Repositories SmartDukaan

Rev

Rev 3374 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3374 Rev 4496
Line 1... Line 1...
1
namespace java in.shop2020.generic
1
namespace java in.shop2020.generic
2
namespace py shop2020.thriftpy.generic
2
namespace py shop2020.thriftpy.generic
3
 
3
 
-
 
4
enum ExceptionType {
-
 
5
    NULL_POINTER = 101,
-
 
6
    ILLEGAL_ARGUMENTS = 102,
-
 
7
    DATABASE_ERROR = 103,
-
 
8
    NOT_AUTHORIZED = 104
-
 
9
}
-
 
10
 
-
 
11
const map<ExceptionType, string> EXCEPTION_TYPES_DESCRIPTION = {
-
 
12
    ExceptionType.NULL_POINTER : "Null pointer exception",
-
 
13
    ExceptionType.ILLEGAL_ARGUMENTS : "Illegal arguments, could not lookup",
-
 
14
    ExceptionType.DATABASE_ERROR : "Error in the DB layer",
-
 
15
    ExceptionType.NOT_AUTHORIZED : "Not authorized"
-
 
16
};
-
 
17
 
4
service GenericService{
18
service GenericService{
5
	/**
19
	/**
6
	* For checking weather service is active alive or not. It also checks connectivity with database
20
	* For checking weather service is active alive or not. It also checks connectivity with database
7
	*/
21
	*/
8
	bool isAlive(),
22
	bool isAlive(),
9
	
23
	
10
	/**
24
	/**
11
	* For closing the open session in sqlalchemy
25
	* For closing the open session in sqlalchemy
12
	*/
26
	*/
13
	void closeSession()
27
	void closeSession()
14
}
-
 
15
28
}
-
 
29