All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.icodegarden.nutrient.lang.repository.OptimizeTableResults Maven / Gradle / Ivy

The newest version!
package io.github.icodegarden.nutrient.lang.repository;

import java.util.ArrayList;
import java.util.stream.Collectors;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 
 * @author Fangfang.Xu
 *
 */
public class OptimizeTableResults extends ArrayList {
	private static final long serialVersionUID = 1L;

	public boolean isErrorInMysql() {
		for (OptimizeTableResults.Result result : this) {
			if ("status".equalsIgnoreCase(result.getMsg_type())) {
				if ("OK".equalsIgnoreCase(result.getMsg_text())) {
					return false;
				}
			}
		}
		return true;
	}

	public String getDesc() {
		String desc = this.stream().map(one -> one.getMsg_text()).collect(Collectors.joining(","));
		return desc;
	}

	/**
	 * 源于mysql字段 
	 */
	@Getter
	@Setter
	@ToString
	public static class Result {

		private String Table;
		private String Op;
		private String Msg_type;
		private String Msg_text;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy