Commit 599c18ea authored by Noel Alonso's avatar Noel Alonso
Browse files

Setea fecha de inserción y modificación

parent 34462c09
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
package es.redmic.vesselscommands.commands;

import org.joda.time.DateTime;

import es.redmic.commandslib.commands.Command;
import es.redmic.exception.databinding.FieldNotValidException;
import es.redmic.vesselslib.dto.VesselDTO;
@@ -23,6 +25,9 @@ public class CreateVesselCommand extends Command {
			vessel.setId(PREFIX + vessel.getMmsi());
		}

		vessel.setInserted(DateTime.now());
		vessel.setUpdated(DateTime.now());

		this.setVessel(vessel);
	}

+4 −0
Original line number Diff line number Diff line
package es.redmic.vesselscommands.commands;

import org.joda.time.DateTime;

import es.redmic.commandslib.commands.Command;
import es.redmic.vesselslib.dto.VesselDTO;

@@ -11,6 +13,8 @@ public class UpdateVesselCommand extends Command {
	}

	public UpdateVesselCommand(VesselDTO vessel) {

		vessel.setUpdated(DateTime.now());
		this.setVessel(vessel);
	}