App++
This commit is contained in:
Amit Dixit 2016-10-27 15:59:51 +05:30
parent 7015e95ac3
commit 1ace4c05d6
2 changed files with 9 additions and 11 deletions

View File

@ -21,16 +21,15 @@ package com.iluwatar.module;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
/** /**
* The Data Mapper (DM) is a layer of software that separates the in-memory * The Module pattern can be considered a Creational pattern and a Structural
* objects from the database. Its responsibility is to transfer data between the * pattern. It manages the creation and organization of other elements, and
* two and also to isolate them from each other. With Data Mapper the in-memory * groups them as the structural pattern does. An object that applies this
* objects needn't know even that there's a database present; they need no SQL * pattern can provide the equivalent of a namespace, providing the
* interface code, and certainly no knowledge of the database schema. (The * initialization and finalization process of a static class or a class with
* database schema is always ignorant of the objects that use it.) Since it's a * static members with cleaner, more concise syntax and semantics.
* form of Mapper , Data Mapper itself is even unknown to the domain layer.
* <p> * <p>
* The below example demonstrates basic CRUD operations: Create, Read, Update, * The below example demonstrates a use case for testing two different modules:
* and Delete. * File Logger and Console Logger
* *
*/ */
public final class App { public final class App {
@ -39,7 +38,7 @@ public final class App {
public static ConsoleLoggerModule consoleLoggerModule = null; public static ConsoleLoggerModule consoleLoggerModule = null;
public static void prepare() throws FileNotFoundException { public static void prepare() throws FileNotFoundException {
fileLoggerModule = FileLoggerModule.getSingleton(); fileLoggerModule = FileLoggerModule.getSingleton();
consoleLoggerModule = ConsoleLoggerModule.getSingleton(); consoleLoggerModule = ConsoleLoggerModule.getSingleton();

View File

@ -25,7 +25,6 @@ import com.iluwatar.module.App;
import org.junit.Test; import org.junit.Test;
/** /**
* Tests that Data-Mapper example runs without errors.
*/ */
public final class AppTest { public final class AppTest {