Commit ca85ee7f authored by Noel Alonso's avatar Noel Alonso
Browse files

Añade fechas de creación y modificación en command

parent b7675aeb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@ package es.redmic.atlascommands.commands.layer;

import java.util.UUID;

import org.joda.time.DateTime;

import es.redmic.atlaslib.dto.layer.LayerDTO;
import es.redmic.atlaslib.utils.LayerUtil;
import es.redmic.commandslib.commands.Command;
@@ -39,6 +41,10 @@ public class CreateLayerCommand extends Command {
			// Se crea un id único para Layer
			layer.setId(LayerUtil.generateId(UUID.randomUUID().toString()));
		}
		
		layer.setInserted(DateTime.now());
		layer.setUpdated(DateTime.now());
		
		this.setLayer(layer);
	}

+5 −0
Original line number Diff line number Diff line
package es.redmic.atlascommands.commands.layer;

import org.joda.time.DateTime;

import es.redmic.atlaslib.dto.layer.LayerDTO;
import es.redmic.commandslib.commands.Command;

@@ -31,6 +33,9 @@ public class UpdateLayerCommand extends Command {
	}

	public UpdateLayerCommand(LayerDTO layer) {

		layer.setUpdated(DateTime.now());

		this.setLayer(layer);
	}