Done a full code format review. Improve code format settings.
This commit is contained in:
parent
28d31d94eb
commit
bc969b91a6
12 changed files with 1442 additions and 563 deletions
|
@ -9,3 +9,283 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.source=1.6
|
org.eclipse.jdt.core.compiler.source=1.6
|
||||||
|
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=49
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
|
||||||
|
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
|
||||||
|
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_block_comments=false
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_header=false
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_html=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_source_code=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
|
||||||
|
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
|
||||||
|
org.eclipse.jdt.core.formatter.comment.line_length=80
|
||||||
|
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
|
||||||
|
org.eclipse.jdt.core.formatter.compact_else_if=true
|
||||||
|
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||||
|
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||||
|
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
|
||||||
|
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
|
||||||
|
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
|
||||||
|
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=false
|
||||||
|
org.eclipse.jdt.core.formatter.indent_empty_lines=false
|
||||||
|
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
|
||||||
|
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.join_lines_in_comments=true
|
||||||
|
org.eclipse.jdt.core.formatter.join_wrapped_lines=true
|
||||||
|
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
|
||||||
|
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
|
||||||
|
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
|
||||||
|
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||||
|
org.eclipse.jdt.core.formatter.lineSplit=200
|
||||||
|
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
|
||||||
|
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||||
|
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||||
|
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||||
|
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
||||||
|
org.eclipse.jdt.core.formatter.tabulation.char=tab
|
||||||
|
org.eclipse.jdt.core.formatter.tabulation.size=4
|
||||||
|
org.eclipse.jdt.core.formatter.use_on_off_tags=false
|
||||||
|
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
|
||||||
|
|
109
.settings/org.eclipse.jdt.ui.prefs
Normal file
109
.settings/org.eclipse.jdt.ui.prefs
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
cleanup.add_default_serial_version_id=false
|
||||||
|
cleanup.add_generated_serial_version_id=true
|
||||||
|
cleanup.add_missing_annotations=true
|
||||||
|
cleanup.add_missing_deprecated_annotations=true
|
||||||
|
cleanup.add_missing_methods=false
|
||||||
|
cleanup.add_missing_nls_tags=false
|
||||||
|
cleanup.add_missing_override_annotations=true
|
||||||
|
cleanup.add_missing_override_annotations_interface_methods=true
|
||||||
|
cleanup.add_serial_version_id=true
|
||||||
|
cleanup.always_use_blocks=true
|
||||||
|
cleanup.always_use_parentheses_in_expressions=false
|
||||||
|
cleanup.always_use_this_for_non_static_field_access=true
|
||||||
|
cleanup.always_use_this_for_non_static_method_access=false
|
||||||
|
cleanup.convert_to_enhanced_for_loop=false
|
||||||
|
cleanup.correct_indentation=false
|
||||||
|
cleanup.format_source_code=true
|
||||||
|
cleanup.format_source_code_changes_only=false
|
||||||
|
cleanup.make_local_variable_final=false
|
||||||
|
cleanup.make_parameters_final=true
|
||||||
|
cleanup.make_private_fields_final=false
|
||||||
|
cleanup.make_type_abstract_if_missing_method=false
|
||||||
|
cleanup.make_variable_declarations_final=true
|
||||||
|
cleanup.never_use_blocks=false
|
||||||
|
cleanup.never_use_parentheses_in_expressions=true
|
||||||
|
cleanup.organize_imports=false
|
||||||
|
cleanup.qualify_static_field_accesses_with_declaring_class=false
|
||||||
|
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
|
||||||
|
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=false
|
||||||
|
cleanup.qualify_static_member_accesses_with_declaring_class=true
|
||||||
|
cleanup.qualify_static_method_accesses_with_declaring_class=false
|
||||||
|
cleanup.remove_private_constructors=true
|
||||||
|
cleanup.remove_trailing_whitespaces=true
|
||||||
|
cleanup.remove_trailing_whitespaces_all=true
|
||||||
|
cleanup.remove_trailing_whitespaces_ignore_empty=false
|
||||||
|
cleanup.remove_unnecessary_casts=true
|
||||||
|
cleanup.remove_unnecessary_nls_tags=true
|
||||||
|
cleanup.remove_unused_imports=true
|
||||||
|
cleanup.remove_unused_local_variables=false
|
||||||
|
cleanup.remove_unused_private_fields=true
|
||||||
|
cleanup.remove_unused_private_members=false
|
||||||
|
cleanup.remove_unused_private_methods=true
|
||||||
|
cleanup.remove_unused_private_types=true
|
||||||
|
cleanup.sort_members=true
|
||||||
|
cleanup.sort_members_all=false
|
||||||
|
cleanup.use_blocks=true
|
||||||
|
cleanup.use_blocks_only_for_return_and_throw=false
|
||||||
|
cleanup.use_parentheses_in_expressions=false
|
||||||
|
cleanup.use_this_for_non_static_field_access=true
|
||||||
|
cleanup.use_this_for_non_static_field_access_only_if_necessary=false
|
||||||
|
cleanup.use_this_for_non_static_method_access=false
|
||||||
|
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
|
||||||
|
cleanup_profile=_SikevaDB
|
||||||
|
cleanup_settings_version=2
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
|
||||||
|
formatter_profile=_SikevaDB
|
||||||
|
formatter_settings_version=12
|
||||||
|
sp_cleanup.add_default_serial_version_id=true
|
||||||
|
sp_cleanup.add_generated_serial_version_id=false
|
||||||
|
sp_cleanup.add_missing_annotations=true
|
||||||
|
sp_cleanup.add_missing_deprecated_annotations=true
|
||||||
|
sp_cleanup.add_missing_methods=false
|
||||||
|
sp_cleanup.add_missing_nls_tags=false
|
||||||
|
sp_cleanup.add_missing_override_annotations=true
|
||||||
|
sp_cleanup.add_missing_override_annotations_interface_methods=true
|
||||||
|
sp_cleanup.add_serial_version_id=false
|
||||||
|
sp_cleanup.always_use_blocks=true
|
||||||
|
sp_cleanup.always_use_parentheses_in_expressions=false
|
||||||
|
sp_cleanup.always_use_this_for_non_static_field_access=true
|
||||||
|
sp_cleanup.always_use_this_for_non_static_method_access=false
|
||||||
|
sp_cleanup.convert_to_enhanced_for_loop=false
|
||||||
|
sp_cleanup.correct_indentation=true
|
||||||
|
sp_cleanup.format_source_code=true
|
||||||
|
sp_cleanup.format_source_code_changes_only=false
|
||||||
|
sp_cleanup.make_local_variable_final=false
|
||||||
|
sp_cleanup.make_parameters_final=true
|
||||||
|
sp_cleanup.make_private_fields_final=false
|
||||||
|
sp_cleanup.make_type_abstract_if_missing_method=false
|
||||||
|
sp_cleanup.make_variable_declarations_final=true
|
||||||
|
sp_cleanup.never_use_blocks=false
|
||||||
|
sp_cleanup.never_use_parentheses_in_expressions=true
|
||||||
|
sp_cleanup.on_save_use_additional_actions=true
|
||||||
|
sp_cleanup.organize_imports=true
|
||||||
|
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
|
||||||
|
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
|
||||||
|
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
|
||||||
|
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
|
||||||
|
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
|
||||||
|
sp_cleanup.remove_private_constructors=true
|
||||||
|
sp_cleanup.remove_trailing_whitespaces=false
|
||||||
|
sp_cleanup.remove_trailing_whitespaces_all=true
|
||||||
|
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
|
||||||
|
sp_cleanup.remove_unnecessary_casts=true
|
||||||
|
sp_cleanup.remove_unnecessary_nls_tags=true
|
||||||
|
sp_cleanup.remove_unused_imports=true
|
||||||
|
sp_cleanup.remove_unused_local_variables=false
|
||||||
|
sp_cleanup.remove_unused_private_fields=true
|
||||||
|
sp_cleanup.remove_unused_private_members=false
|
||||||
|
sp_cleanup.remove_unused_private_methods=true
|
||||||
|
sp_cleanup.remove_unused_private_types=true
|
||||||
|
sp_cleanup.sort_members=true
|
||||||
|
sp_cleanup.sort_members_all=false
|
||||||
|
sp_cleanup.use_blocks=true
|
||||||
|
sp_cleanup.use_blocks_only_for_return_and_throw=false
|
||||||
|
sp_cleanup.use_parentheses_in_expressions=false
|
||||||
|
sp_cleanup.use_this_for_non_static_field_access=true
|
||||||
|
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false
|
||||||
|
sp_cleanup.use_this_for_non_static_method_access=false
|
||||||
|
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013, 2014 Christian Pierre MOMON, DEVINSY
|
* Copyright (C) 2013-2016 Christian Pierre MOMON, DEVINSY
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -24,10 +24,10 @@ import org.joda.time.DateTime;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author Christian P. Momon
|
* @author Christian Pierre MOMON
|
||||||
*/
|
*/
|
||||||
public class Element {
|
public class Element
|
||||||
|
{
|
||||||
public static final long NO_ID = -1;
|
public static final long NO_ID = -1;
|
||||||
|
|
||||||
private long id;
|
private long id;
|
||||||
|
@ -45,7 +45,8 @@ public class Element {
|
||||||
* @param key
|
* @param key
|
||||||
* @param value
|
* @param value
|
||||||
*/
|
*/
|
||||||
public Element() {
|
public Element()
|
||||||
|
{
|
||||||
this.id = NO_ID;
|
this.id = NO_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +55,8 @@ public class Element {
|
||||||
* @param key
|
* @param key
|
||||||
* @param value
|
* @param value
|
||||||
*/
|
*/
|
||||||
public Element(final String key, final String subkey, final String value) {
|
public Element(final String key, final String subkey, final String value)
|
||||||
|
{
|
||||||
update(value);
|
update(value);
|
||||||
this.archiveDate = null;
|
this.archiveDate = null;
|
||||||
this.key = key;
|
this.key = key;
|
||||||
|
@ -64,83 +66,103 @@ public class Element {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void archive() {
|
public void archive()
|
||||||
|
{
|
||||||
this.archiveDate = DateTime.now();
|
this.archiveDate = DateTime.now();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DateTime getArchiveDate() {
|
public DateTime getArchiveDate()
|
||||||
|
{
|
||||||
return this.archiveDate;
|
return this.archiveDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DateTime getCreationDate() {
|
public DateTime getCreationDate()
|
||||||
|
{
|
||||||
return this.creationDate;
|
return this.creationDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDigest() {
|
public String getDigest()
|
||||||
|
{
|
||||||
return this.digest;
|
return this.digest;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DateTime getEditionDate() {
|
public DateTime getEditionDate()
|
||||||
|
{
|
||||||
return this.editionDate;
|
return this.editionDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getId() {
|
public long getId()
|
||||||
|
{
|
||||||
return this.id;
|
return this.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getKey() {
|
public String getKey()
|
||||||
|
{
|
||||||
return this.key;
|
return this.key;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getSize() {
|
public long getSize()
|
||||||
|
{
|
||||||
return this.size;
|
return this.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSubkey() {
|
public String getSubkey()
|
||||||
|
{
|
||||||
return this.subkey;
|
return this.subkey;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getValue() {
|
public String getValue()
|
||||||
|
{
|
||||||
return this.value;
|
return this.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setArchiveDate(final DateTime date) {
|
public void setArchiveDate(final DateTime date)
|
||||||
|
{
|
||||||
this.archiveDate = date;
|
this.archiveDate = date;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreationDate(final DateTime date) {
|
public void setCreationDate(final DateTime date)
|
||||||
|
{
|
||||||
this.creationDate = date;
|
this.creationDate = date;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDigest(final String digest) {
|
public void setDigest(final String digest)
|
||||||
|
{
|
||||||
this.digest = digest;
|
this.digest = digest;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEditionDate(final DateTime date) {
|
public void setEditionDate(final DateTime date)
|
||||||
|
{
|
||||||
this.editionDate = date;
|
this.editionDate = date;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(final long id) {
|
public void setId(final long id)
|
||||||
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setKey(final String key) {
|
public void setKey(final String key)
|
||||||
|
{
|
||||||
this.key = key;
|
this.key = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSize(final long size) {
|
public void setSize(final long size)
|
||||||
|
{
|
||||||
this.size = size;
|
this.size = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSubkey(final String subkey) {
|
public void setSubkey(final String subkey)
|
||||||
|
{
|
||||||
this.subkey = subkey;
|
this.subkey = subkey;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValue(final String value) {
|
public void setValue(final String value)
|
||||||
|
{
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update(final String value) {
|
public void update(final String value)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
setValue(value);
|
setValue(value);
|
||||||
|
|
||||||
|
@ -148,16 +170,20 @@ public class Element {
|
||||||
this.editionDate = DateTime.now();
|
this.editionDate = DateTime.now();
|
||||||
|
|
||||||
//
|
//
|
||||||
if (value == null) {
|
if (value == null)
|
||||||
|
{
|
||||||
this.size = 0;
|
this.size = 0;
|
||||||
this.digest = null;
|
this.digest = null;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
this.size = this.value.length();
|
this.size = this.value.length();
|
||||||
this.digest = DigestUtils.md5Hex(this.value);
|
this.digest = DigestUtils.md5Hex(this.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
if (this.creationDate == null) {
|
if (this.creationDate == null)
|
||||||
|
{
|
||||||
this.creationDate = this.editionDate;
|
this.creationDate = this.editionDate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013, 2014 Christian Pierre MOMON, DEVINSY
|
* Copyright (C) 2013-2016 Christian Pierre MOMON, DEVINSY
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -23,24 +23,25 @@ import java.util.ArrayList;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author Christian P. Momon
|
* @author Christian Pierre MOMON
|
||||||
*/
|
*/
|
||||||
public class Elements extends ArrayList<Element> {
|
public class Elements extends ArrayList<Element>
|
||||||
|
{
|
||||||
private static final long serialVersionUID = 6298920093179395791L;
|
private static final long serialVersionUID = 6298920093179395791L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public Elements() {
|
public Elements()
|
||||||
|
{
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public Elements(final int initialCapacity) {
|
public Elements(final int initialCapacity)
|
||||||
|
{
|
||||||
super(initialCapacity);
|
super(initialCapacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013, 2014 Christian Pierre MOMON, DEVINSY
|
* Copyright (C) 2013-2016 Christian Pierre MOMON, DEVINSY
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -27,14 +27,16 @@ import fr.devinsy.util.StringList;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author Christian P. Momon
|
* @author Christian Pierre MOMON
|
||||||
*/
|
*/
|
||||||
public class FileSikevaDB implements SikevaDB {
|
public class FileSikevaDB implements SikevaDB
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param path
|
* @param path
|
||||||
*/
|
*/
|
||||||
public FileSikevaDB(final File path) {
|
public FileSikevaDB(final File path)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,324 +44,378 @@ public class FileSikevaDB implements SikevaDB {
|
||||||
*
|
*
|
||||||
* @param path
|
* @param path
|
||||||
*/
|
*/
|
||||||
public FileSikevaDB(final String path) {
|
public FileSikevaDB(final String path)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void archive(final String key) throws Exception {
|
public void archive(final String key) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void archive(final String key, final String subkey) throws Exception {
|
public void archive(final String key, final String subkey) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearAllArchive() throws Exception {
|
public void clearAllArchive() throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearArchive(final DateTime beforeDate) throws Exception {
|
public void clearArchive(final DateTime beforeDate) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearArchive(final int maxDays) throws Exception {
|
public void clearArchive(final int maxDays) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearDatabase() throws Exception {
|
public void clearDatabase() throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close()
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long countOfAllElements() {
|
public long countOfAllElements()
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long countOfAllElements(final String key) {
|
public long countOfAllElements(final String key)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long countOfAllElements(final String key, final String subkey) {
|
public long countOfAllElements(final String key, final String subkey)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long countOfArchivedElements() {
|
public long countOfArchivedElements()
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long countOfArchivedElements(final String key) {
|
public long countOfArchivedElements(final String key)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long countOfArchivedElements(final String key, final String subkey) {
|
public long countOfArchivedElements(final String key, final String subkey)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long countOfElements() {
|
public long countOfElements()
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long countOfElements(final String key) {
|
public long countOfElements(final String key)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long countOfElements(final String key, final String subkey) {
|
public long countOfElements(final String key, final String subkey)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Elements getAllElements() throws Exception {
|
public Elements getAllElements() throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Elements getAllElements(final String key) throws Exception {
|
public Elements getAllElements(final String key) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Elements getAllElements(final String key, final String subkey) throws Exception {
|
public Elements getAllElements(final String key, final String subkey) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StringList getAllKeys() throws Exception {
|
public StringList getAllKeys() throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StringList getAllSubkeys(final String key) throws Exception {
|
public StringList getAllSubkeys(final String key) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StringList getAllValues(final String key) {
|
public StringList getAllValues(final String key)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StringList getAllValues(final String key, final String subkey) {
|
public StringList getAllValues(final String key, final String subkey)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StringList getArchivedValues(final String key) {
|
public StringList getArchivedValues(final String key)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StringList getArchivedValues(final String key, final String subkey) {
|
public StringList getArchivedValues(final String key, final String subkey)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Element getElement(final String key) throws Exception {
|
public Element getElement(final String key) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Element getElement(final String key, final String subkey) throws Exception {
|
public Element getElement(final String key, final String subkey) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Elements getElements(final String key) throws Exception {
|
public Elements getElements(final String key) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Elements getElements(final String key, final String subkey) throws Exception {
|
public Elements getElements(final String key, final String subkey) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StringList getKeys() throws Exception {
|
public StringList getKeys() throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StringList getSubkeys(final String key) throws Exception {
|
public StringList getSubkeys(final String key) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getValue(final String key) throws Exception {
|
public String getValue(final String key) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getValue(final String key, final String subkey) {
|
public String getValue(final String key, final String subkey)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StringList getValues(final String key) {
|
public StringList getValues(final String key)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long memorySize() {
|
public long memorySize()
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long memorySize(final String key) {
|
public long memorySize(final String key)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long memorySize(final String key, final String subkey) {
|
public long memorySize(final String key, final String subkey)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long memorySizeOfAll() throws Exception {
|
public long memorySizeOfAll() throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long memorySizeOfAll(final String key) throws Exception {
|
public long memorySizeOfAll(final String key) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long memorySizeOfArchive() throws Exception {
|
public long memorySizeOfArchive() throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long memorySizeOfArchive(final String key) throws Exception {
|
public long memorySizeOfArchive(final String key) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long memorySizeOfArchive(final String key, final String subkey) throws Exception {
|
public long memorySizeOfArchive(final String key, final String subkey) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void open() {
|
public void open()
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void put(final Element element) throws Exception {
|
public void put(final Element element) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void put(final String key, final String value) {
|
public void put(final String key, final String value)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void put(final String key, final String subkey, final String value) {
|
public void put(final String key, final String subkey, final String value)
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void remove(final String key) throws Exception {
|
public void remove(final String key) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void remove(final String key, final String subkey) throws Exception {
|
public void remove(final String key, final String subkey) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeAll(final String key) throws Exception {
|
public void removeAll(final String key) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeMany(final String key, final String... subkeys) throws Exception {
|
public void removeMany(final String key, final String... subkeys) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renameKey(final String oldKey, final String newKey) throws Exception {
|
public void renameKey(final String oldKey, final String newKey) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void replaceInValue(final String key, final String... tokens) throws Exception {
|
public void replaceInValue(final String key, final String... tokens) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void replaceInValues(final String key, final String... tokens) throws Exception {
|
public void replaceInValues(final String key, final String... tokens) throws Exception
|
||||||
|
{
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013, 2014 Christian Pierre MOMON, DEVINSY
|
* Copyright (C) 2013-2016 Christian Pierre MOMON, DEVINSY
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -33,9 +33,10 @@ import fr.devinsy.util.StringList;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author Christian P. Momon
|
* @author Christian Pierre MOMON
|
||||||
*/
|
*/
|
||||||
public class SQLSikevaDBTools {
|
public class SQLSikevaDBTools
|
||||||
|
{
|
||||||
private static final Logger logger = LoggerFactory.getLogger(SQLSikevaDBTools.class);
|
private static final Logger logger = LoggerFactory.getLogger(SQLSikevaDBTools.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,7 +44,8 @@ public class SQLSikevaDBTools {
|
||||||
* @param source
|
* @param source
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public static StringList loadSQLScript(final URL source) throws IOException {
|
public static StringList loadSQLScript(final URL source) throws IOException
|
||||||
|
{
|
||||||
StringList result;
|
StringList result;
|
||||||
|
|
||||||
String script = FileTools.load(source);
|
String script = FileTools.load(source);
|
||||||
|
@ -59,28 +61,36 @@ public class SQLSikevaDBTools {
|
||||||
* @param source
|
* @param source
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public static StringList splitSQLCommands(final String source) throws IOException {
|
public static StringList splitSQLCommands(final String source) throws IOException
|
||||||
|
{
|
||||||
StringList result;
|
StringList result;
|
||||||
|
|
||||||
//
|
//
|
||||||
result = new StringList();
|
result = new StringList();
|
||||||
|
|
||||||
//
|
//
|
||||||
if (source != null) {
|
if (source != null)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
BufferedReader in = new BufferedReader(new StringReader(source));
|
BufferedReader in = new BufferedReader(new StringReader(source));
|
||||||
|
|
||||||
boolean ended = false;
|
boolean ended = false;
|
||||||
StringList sql = new StringList();
|
StringList sql = new StringList();
|
||||||
while (!ended) {
|
while (!ended)
|
||||||
|
{
|
||||||
String line = in.readLine();
|
String line = in.readLine();
|
||||||
|
|
||||||
if (line == null) {
|
if (line == null)
|
||||||
|
{
|
||||||
ended = true;
|
ended = true;
|
||||||
} else {
|
}
|
||||||
if ((StringUtils.isNotBlank(line)) && (!line.startsWith("--"))) {
|
else
|
||||||
|
{
|
||||||
|
if ((StringUtils.isNotBlank(line)) && (!line.startsWith("--")))
|
||||||
|
{
|
||||||
//
|
//
|
||||||
if (line.endsWith(";")) {
|
if (line.endsWith(";"))
|
||||||
|
{
|
||||||
//
|
//
|
||||||
sql.append(line.substring(0, line.length() - 1));
|
sql.append(line.substring(0, line.length() - 1));
|
||||||
|
|
||||||
|
@ -90,10 +100,11 @@ public class SQLSikevaDBTools {
|
||||||
//
|
//
|
||||||
sql.clear();
|
sql.clear();
|
||||||
|
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//
|
//
|
||||||
sql.append(line).append(' ');
|
sql.append(line).append(' ');
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013, 2014 Christian Pierre MOMON, DEVINSY
|
* Copyright (C) 2013-2016 Christian Pierre MOMON, DEVINSY
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -27,10 +27,10 @@ import fr.devinsy.util.StringList;
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author Christian P. Momon
|
* @author Christian Pierre MOMON
|
||||||
*/
|
*/
|
||||||
public interface SikevaDB {
|
public interface SikevaDB
|
||||||
|
{
|
||||||
public void archive(final String key) throws Exception;
|
public void archive(final String key) throws Exception;
|
||||||
|
|
||||||
public void archive(final String key, final String subkey) throws Exception;
|
public void archive(final String key, final String subkey) throws Exception;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013, 2014 Christian Pierre MOMON, DEVINSY
|
* Copyright (C) 2013-2016 Christian Pierre MOMON, DEVINSY
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -23,15 +23,17 @@ import java.io.File;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author Christian P. Momon
|
* @author Christian Pierre MOMON
|
||||||
*/
|
*/
|
||||||
public class SikevaDBFactory {
|
public class SikevaDBFactory
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param path
|
* @param path
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static SikevaDB get(final File path) {
|
public static SikevaDB get(final File path)
|
||||||
|
{
|
||||||
SikevaDB result;
|
SikevaDB result;
|
||||||
|
|
||||||
result = new FileSikevaDB(path);
|
result = new FileSikevaDB(path);
|
||||||
|
@ -45,7 +47,8 @@ public class SikevaDBFactory {
|
||||||
* @param path
|
* @param path
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static SikevaDB get(final String contextName) {
|
public static SikevaDB get(final String contextName)
|
||||||
|
{
|
||||||
SikevaDB result;
|
SikevaDB result;
|
||||||
|
|
||||||
result = new SQLSikevaDB(contextName);
|
result = new SQLSikevaDB(contextName);
|
||||||
|
@ -62,7 +65,8 @@ public class SikevaDBFactory {
|
||||||
* @param password
|
* @param password
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static SikevaDB get(final String driverClassName, final String url, final String login, final String password) {
|
public static SikevaDB get(final String driverClassName, final String url, final String login, final String password)
|
||||||
|
{
|
||||||
SikevaDB result;
|
SikevaDB result;
|
||||||
|
|
||||||
result = new SQLSikevaDB(driverClassName, url, login, password);
|
result = new SQLSikevaDB(driverClassName, url, login, password);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013, 2014 Christian Pierre MOMON, DEVINSY
|
* Copyright (C) 2013-2016 Christian Pierre MOMON, DEVINSY
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -23,10 +23,12 @@ import java.util.Date;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author Christian P. Momon
|
* @author Christian Pierre MOMON
|
||||||
*/
|
*/
|
||||||
public class SikevaDBUtils {
|
public class SikevaDBUtils
|
||||||
public static long now() {
|
{
|
||||||
|
public static long now()
|
||||||
|
{
|
||||||
return new Date().getTime();
|
return new Date().getTime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013, 2014 Christian Pierre MOMON, DEVINSY
|
* Copyright (C) 2013-2016 Christian Pierre MOMON, DEVINSY
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -40,7 +40,8 @@ import fr.devinsy.util.xml.XMLZipWriter;
|
||||||
*
|
*
|
||||||
* @author TIP
|
* @author TIP
|
||||||
*/
|
*/
|
||||||
public class XMLSikevaDB {
|
public class XMLSikevaDB
|
||||||
|
{
|
||||||
private static final Logger logger = LoggerFactory.getLogger(XMLSikevaDB.class);
|
private static final Logger logger = LoggerFactory.getLogger(XMLSikevaDB.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,7 +53,8 @@ public class XMLSikevaDB {
|
||||||
* Source.
|
* Source.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static void export(final OutputStream out, final SikevaDB source) throws Exception {
|
public static void export(final OutputStream out, final SikevaDB source) throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
String fileName = "sikevadb-" + DateTime.now().toString("yyyy-MM-dd-HH'h'mm'mn'ss's'") + ".xml.zip";
|
String fileName = "sikevadb-" + DateTime.now().toString("yyyy-MM-dd-HH'h'mm'mn'ss's'") + ".xml.zip";
|
||||||
|
|
||||||
|
@ -69,18 +71,26 @@ public class XMLSikevaDB {
|
||||||
* Source.
|
* Source.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static void export(final OutputStream out, final SikevaDB source, final String fileName) throws Exception {
|
public static void export(final OutputStream out, final SikevaDB source, final String fileName) throws Exception
|
||||||
|
{
|
||||||
if (out == null) {
|
if (out == null)
|
||||||
|
{
|
||||||
throw new NullPointerException("out is null.");
|
throw new NullPointerException("out is null.");
|
||||||
} else if (source == null) {
|
}
|
||||||
|
else if (source == null)
|
||||||
|
{
|
||||||
throw new NullPointerException("source is null.");
|
throw new NullPointerException("source is null.");
|
||||||
} else if (fileName == null) {
|
}
|
||||||
|
else if (fileName == null)
|
||||||
|
{
|
||||||
export(out, source, fileName);
|
export(out, source, fileName);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//
|
//
|
||||||
XMLZipWriter target = null;
|
XMLZipWriter target = null;
|
||||||
try {
|
try
|
||||||
|
{
|
||||||
//
|
//
|
||||||
target = new XMLZipWriter(out, fileName, "Generated by SikevaDB.");
|
target = new XMLZipWriter(out, fileName, "Generated by SikevaDB.");
|
||||||
|
|
||||||
|
@ -89,9 +99,11 @@ public class XMLSikevaDB {
|
||||||
|
|
||||||
//
|
//
|
||||||
write(target, source);
|
write(target, source);
|
||||||
|
}
|
||||||
} finally {
|
finally
|
||||||
if (target != null) {
|
{
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
target.close();
|
target.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,7 +115,8 @@ public class XMLSikevaDB {
|
||||||
* @param file
|
* @param file
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static void importData(final SikevaDB database, final File file) throws Exception {
|
public static void importData(final SikevaDB database, final File file) throws Exception
|
||||||
|
{
|
||||||
|
|
||||||
// XMLReader in = null;
|
// XMLReader in = null;
|
||||||
// try {
|
// try {
|
||||||
|
@ -124,7 +137,8 @@ public class XMLSikevaDB {
|
||||||
* @throws XMLStreamException
|
* @throws XMLStreamException
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static Element readElement(final XMLReader in) throws XMLStreamException, XMLBadFormatException {
|
public static Element readElement(final XMLReader in) throws XMLStreamException, XMLBadFormatException
|
||||||
|
{
|
||||||
Element result;
|
Element result;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -144,9 +158,12 @@ public class XMLSikevaDB {
|
||||||
|
|
||||||
DateTime archiveDate;
|
DateTime archiveDate;
|
||||||
String archiveDateValue = in.readNullableContentTag("archive_date").getContent();
|
String archiveDateValue = in.readNullableContentTag("archive_date").getContent();
|
||||||
if (archiveDateValue == null) {
|
if (archiveDateValue == null)
|
||||||
|
{
|
||||||
archiveDate = null;
|
archiveDate = null;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
archiveDate = DateTime.parse(archiveDateValue);
|
archiveDate = DateTime.parse(archiveDateValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +179,6 @@ public class XMLSikevaDB {
|
||||||
result.setCreationDate(creationDate);
|
result.setCreationDate(creationDate);
|
||||||
result.setEditionDate(editionDate);
|
result.setEditionDate(editionDate);
|
||||||
result.setArchiveDate(archiveDate);
|
result.setArchiveDate(archiveDate);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -178,15 +194,17 @@ public class XMLSikevaDB {
|
||||||
* @param in
|
* @param in
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static void readElements(final SikevaDB target, final XMLReader in) throws Exception {
|
public static void readElements(final SikevaDB target, final XMLReader in) throws Exception
|
||||||
|
{
|
||||||
|
|
||||||
//
|
//
|
||||||
XMLTag list = in.readListTag("elements");
|
XMLTag list = in.readListTag("elements");
|
||||||
|
|
||||||
//
|
//
|
||||||
if (list.getType() != TagType.EMPTY) {
|
if (list.getType() != TagType.EMPTY)
|
||||||
|
{
|
||||||
while (in.hasNextStartTag("element")) {
|
while (in.hasNextStartTag("element"))
|
||||||
|
{
|
||||||
|
|
||||||
//
|
//
|
||||||
Element element = readElement(in);
|
Element element = readElement(in);
|
||||||
|
@ -205,13 +223,19 @@ public class XMLSikevaDB {
|
||||||
* @param source
|
* @param source
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static void write(final XMLWriter out, final Element source) {
|
public static void write(final XMLWriter out, final Element source)
|
||||||
|
{
|
||||||
|
|
||||||
if (out == null) {
|
if (out == null)
|
||||||
|
{
|
||||||
throw new NullPointerException("out is null.");
|
throw new NullPointerException("out is null.");
|
||||||
} else if (source == null) {
|
}
|
||||||
|
else if (source == null)
|
||||||
|
{
|
||||||
throw new NullPointerException("element is null.");
|
throw new NullPointerException("element is null.");
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//
|
//
|
||||||
out.writeStartTag("element");
|
out.writeStartTag("element");
|
||||||
|
|
||||||
|
@ -219,9 +243,12 @@ public class XMLSikevaDB {
|
||||||
{
|
{
|
||||||
out.writeTag("id", String.valueOf(source.getId()));
|
out.writeTag("id", String.valueOf(source.getId()));
|
||||||
out.writeTag("key", StringEscapeUtils.escapeXml(source.getKey()));
|
out.writeTag("key", StringEscapeUtils.escapeXml(source.getKey()));
|
||||||
if (source.getSubkey() == null) {
|
if (source.getSubkey() == null)
|
||||||
|
{
|
||||||
out.writeTag("subkey", null);
|
out.writeTag("subkey", null);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
out.writeTag("subkey", StringEscapeUtils.escapeXml(source.getSubkey()));
|
out.writeTag("subkey", StringEscapeUtils.escapeXml(source.getSubkey()));
|
||||||
}
|
}
|
||||||
out.writeTag("value", StringEscapeUtils.escapeXml(source.getValue()));
|
out.writeTag("value", StringEscapeUtils.escapeXml(source.getValue()));
|
||||||
|
@ -229,9 +256,12 @@ public class XMLSikevaDB {
|
||||||
out.writeTag("digest", source.getDigest());
|
out.writeTag("digest", source.getDigest());
|
||||||
out.writeTag("creation_date", source.getCreationDate().toString());
|
out.writeTag("creation_date", source.getCreationDate().toString());
|
||||||
out.writeTag("edition_date", source.getEditionDate().toString());
|
out.writeTag("edition_date", source.getEditionDate().toString());
|
||||||
if (source.getArchiveDate() == null) {
|
if (source.getArchiveDate() == null)
|
||||||
|
{
|
||||||
out.writeTag("archive_date", null);
|
out.writeTag("archive_date", null);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
out.writeTag("archive_date", source.getArchiveDate().toString());
|
out.writeTag("archive_date", source.getArchiveDate().toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -247,31 +277,36 @@ public class XMLSikevaDB {
|
||||||
* @param source
|
* @param source
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static void write(final XMLWriter out, final SikevaDB source) throws Exception {
|
public static void write(final XMLWriter out, final SikevaDB source) throws Exception
|
||||||
|
{
|
||||||
|
|
||||||
if (out == null) {
|
if (out == null)
|
||||||
//
|
{
|
||||||
throw new NullPointerException("out is null.");
|
throw new NullPointerException("out is null.");
|
||||||
|
}
|
||||||
} else if (source == null) {
|
else if (source == null)
|
||||||
//
|
{
|
||||||
out.writeEmptyTag("elements");
|
out.writeEmptyTag("elements");
|
||||||
|
}
|
||||||
} else {
|
else
|
||||||
//
|
{
|
||||||
out.writeStartTag("elements");
|
out.writeStartTag("elements");
|
||||||
|
|
||||||
for (String key : source.getAllKeys()) {
|
for (String key : source.getAllKeys())
|
||||||
|
{
|
||||||
//
|
//
|
||||||
Elements elements = source.getAllElements(key);
|
Elements elements = source.getAllElements(key);
|
||||||
for (Element element : elements) {
|
for (Element element : elements)
|
||||||
|
{
|
||||||
write(out, element);
|
write(out, element);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
for (String subkey : source.getSubkeys(key)) {
|
for (String subkey : source.getSubkeys(key))
|
||||||
|
{
|
||||||
Elements subElements = source.getAllElements(key, subkey);
|
Elements subElements = source.getAllElements(key, subkey);
|
||||||
for (Element subElement : subElements) {
|
for (Element subElement : subElements)
|
||||||
|
{
|
||||||
write(out, subElement);
|
write(out, subElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Copyright (C) 2013, 2014 Christian Pierre MOMON, DEVINSY
|
* Copyright (C) 2013-2016 Christian Pierre MOMON, DEVINSY
|
||||||
*
|
*
|
||||||
* This file is part of SikevaDB, simple key value database.
|
* This file is part of SikevaDB, simple key value database.
|
||||||
*
|
*
|
||||||
|
@ -38,18 +38,19 @@ import fr.devinsy.util.StringList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Christian P. Momon
|
* @author Christian Pierre MOMON
|
||||||
*/
|
*/
|
||||||
public class SQLSikevaDBTest {
|
public class SQLSikevaDBTest
|
||||||
|
{
|
||||||
private static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SQLSikevaDBTest.class);
|
private static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SQLSikevaDBTest.class);
|
||||||
private static SQLSikevaDB database;
|
private static SQLSikevaDB database;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testClearArchive01() throws Exception {
|
public void testClearArchive01() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -85,7 +86,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testClearArchive02() throws Exception {
|
public void testClearArchive02() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -121,7 +123,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testGeKeyse01() throws Exception {
|
public void testGeKeyse01() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -151,7 +154,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testGeKeyse02() throws Exception {
|
public void testGeKeyse02() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -186,7 +190,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testMemorySize01() throws Exception {
|
public void testMemorySize01() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -225,7 +230,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testPut01() throws Exception {
|
public void testPut01() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -245,7 +251,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testPut02() throws Exception {
|
public void testPut02() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -269,7 +276,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testPut03() throws Exception {
|
public void testPut03() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -293,7 +301,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testPut04() throws Exception {
|
public void testPut04() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -314,7 +323,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testPut05() throws Exception {
|
public void testPut05() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -345,7 +355,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testPut06() throws Exception {
|
public void testPut06() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -376,7 +387,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testPutElement01() throws Exception {
|
public void testPutElement01() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -408,7 +420,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testPutElement02() throws Exception {
|
public void testPutElement02() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -441,7 +454,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testPutElement03() throws Exception {
|
public void testPutElement03() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -496,7 +510,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testRandom01() throws Exception {
|
public void testRandom01() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -521,7 +536,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testRemove01() throws Exception {
|
public void testRemove01() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -552,7 +568,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testRemoveMany01() throws Exception {
|
public void testRemoveMany01() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -587,7 +604,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testRenameKey01() throws Exception {
|
public void testRenameKey01() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -617,7 +635,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testSize01() throws Exception {
|
public void testSize01() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -667,7 +686,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testTittle01() throws Exception {
|
public void testTittle01() throws Exception
|
||||||
|
{
|
||||||
//
|
//
|
||||||
logger.debug("===== test starting...");
|
logger.debug("===== test starting...");
|
||||||
|
|
||||||
|
@ -686,8 +706,10 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void afterClass() {
|
public static void afterClass()
|
||||||
if (database != null) {
|
{
|
||||||
|
if (database != null)
|
||||||
|
{
|
||||||
database.close();
|
database.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -702,7 +724,8 @@ public class SQLSikevaDBTest {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void beforeClass() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException, NamingException, IOException {
|
public static void beforeClass() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException, NamingException, IOException
|
||||||
|
{
|
||||||
BasicConfigurator.configure();
|
BasicConfigurator.configure();
|
||||||
Logger.getRootLogger().setLevel(Level.ERROR);
|
Logger.getRootLogger().setLevel(Level.ERROR);
|
||||||
|
|
||||||
|
@ -716,5 +739,4 @@ public class SQLSikevaDBTest {
|
||||||
database.open();
|
database.open();
|
||||||
database.createSchema();
|
database.createSchema();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue