core: Fix modifiers in VmGuestAgentInterfaceDao

Added missing implied final and static modifiers and @Override
annotations in VmGuestAgentInterfaceDaoDbFacadeImpl, to resolve the
MS_SHOULD_BE_FINAL issue detected by FindBugs.

Change-Id: I3b28efa59756f3f022271b8d8e352ceb3c91887d
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Move saveIsInitialized to VmDao

Moved saveIsInitialized(vmId, isInitialized) from DbFacade to VmDao,
where it belongs.

Change-Id: Id4cea34ec7306b64f99c9a46a78d11083a91eb20
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Java conventions for DbFacade method names

Renamed DbFacade's methods to use Java camelCase conventions, with a
lower-case first letter.

Change-Id: I4f4543175c736f4ac09350947a6895598a5adc54
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Remove default audit logging

Removed the notion of default logging from AuditLogDirector and
AuditLogableBase, as it literally did nothing.

Change-Id: I00e2059f6793dcaaf909f28ab2428e04b9bf0281
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Remove redundant cast from AuditLogableBase

Removed a cast of getuser_id() to NGuid, as it is already an NGuid, so
the cast is pointless.

Change-Id: If1ff45e0910965e695a91f3f4de2719f00f216ad
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Audit logging method names

Changed AuditLogDirector and AudtiLoggableBase's method names to adhere
to Java's naming convention - camelCase, with the first letter in lower
case.

Change-Id: I14b45ff779448a526ca067e38c4ae6df1a73d18d
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: ADL - remove redundant null check

Removed a redundant null check in AuditLogDirector.log.

The if branch will occur if auditLogable is null, so the else branch
needed double check it - we already know it to be null.

Change-Id: I03de66e7494d1b191ad7c71c726bff4aebc570c1
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Seriazlizable DiskImage comperators

Both DiskImage comperators in the dal packages were not defined as
serializable, which is considered to be a good defensive approach,
especially since comperators are stateless, so serializing them is
practically free.

This addresses the FindBugs warning SE_COMPARATOR_SHOULD_BE_SERIALIZABLE
on these classes.

Change-Id: I0c0474da61a9d692bc35b2cb4b6d7e9be06edd34
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Singleton row mapper for Bookmarks

Added a singleton row mapper for BookmarkDAO, as specified by
http://www.ovirt.org/Backend_Coding_Standards .

Change-Id: I3eccfb32acd4c2e335a385b9440e22c118ec68d5
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Singleton row mapper for Tags

Added a singleton row mapper for TagDAO, as specified by
http://www.ovirt.org/Backend_Coding_Standards .

Change-Id: I016cee1e6e219924b11e6a3cfe33efd8bc5202a3
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: MapEntry iterator in PostgresDbEngineDialect

Iterated over the entries in
extractOutputParameters(CallableStatement,List) instead of the keySet
for better performance.

Note that this addressed the FindBugs issue of WMI_WRONG_MAP_ITERATOR
for this class.

Change-Id: I42c320fd77c485b787e94899c4944c39d6fddec8
Signed-off-by: Allon Mureinik <amureini@redhat.com>